1 IN: concurrency.distributed.tests
2 USING: tools.test concurrency.distributed kernel io.files
3 io.files.temp io.directories arrays io.sockets system
4 combinators threads math sequences concurrency.messaging
5 continuations accessors prettyprint ;
7 : test-node ( -- addrspec )
9 { [ os unix? ] [ "distributed-concurrency-test" temp-file <local> ] }
10 { [ os windows? ] [ "127.0.0.1" 1238 <inet4> ] }
13 [ ] [ [ "distributed-concurrency-test" temp-file delete-file ] ignore-errors ] unit-test
15 [ ] [ test-node dup (start-node) ] unit-test
19 receive first2 [ 3 + ] dip send
20 "thread-a" unregister-process
22 "thread-a" swap register-process
27 "thread-a" test-node <remote-process> send
32 [ ] [ test-node stop-node ] unit-test