1 USING: tools.test concurrency.distributed kernel io.files
2 io.files.temp io.directories arrays io.sockets system
3 combinators threads math sequences concurrency.messaging
4 continuations accessors prettyprint ;
5 FROM: concurrency.messaging => receive send ;
6 IN: concurrency.distributed.tests
8 : test-node ( -- addrspec )
10 { [ os unix? ] [ "distributed-concurrency-test" temp-file <local> ] }
11 { [ os windows? ] [ "127.0.0.1" 1238 <inet4> ] }
14 [ ] [ [ "distributed-concurrency-test" temp-file delete-file ] ignore-errors ] unit-test
16 [ ] [ test-node dup (start-node) ] unit-test
20 receive first2 [ 3 + ] dip send
21 "thread-a" unregister-process
23 "thread-a" swap register-process
28 "thread-a" test-node <remote-process> send
33 [ ] [ test-node stop-node ] unit-test