153154155156157158159160161162163
server.start(); Thread.sleep(100); client.start(); client.join(); server.join(); } @Test public void testFiberAsyncFile() throws Exception {
770771772773774775776777778779780
ch1.send(3); ch1.send(4); Strand.sleep(50); ch1.send(5); ch1.close(); fib.join(); } @Test public void testFiberTransform1() throws Exception { final Channel<Integer> in = newChannel();
817818819820821822823824825826827
in.close(); } }).start(); fib1.join(); fib2.join(); } @Test public void testFlatmapSendThreadToFiber() throws Exception { final Channel<Integer> ch = newChannel();
858859860861862863864865866867868
ch1.send(2); ch1.send(3); ch1.send(4); ch1.send(5); ch1.close(); fib.join(); } //@Test public void testFlatmapSendWithTimeoutsThreadToFiber() throws Exception { final Channel<Integer> ch = newChannel();
904905906907908909910911912913914
ch1.send(3); ch1.send(4); Strand.sleep(50); ch1.send(5); ch1.close(); fib.join(); } @Test public void testForEach() throws Exception { final Channel<Integer> ch = newChannel();
138139140141142143144145146147148
channel1.send("hello"); Thread.sleep(200); channel3.send("world!"); fib.join(); } @Test public void testSelectReceive2() throws Exception { final Channel<String> channel1 = newChannel();
182183184185186187188189190191192
}).start(); channel1.send("hello"); channel3.send("world!"); fib.join(); } @Test public void testSelectReceiveWithClose1() throws Exception { final Channel<String> channel1 = newChannel();
216217218219220221222223224225226
}).start(); Thread.sleep(200); channel3.close(); fib.join(); } @Test public void testSelectReceiveWithClose2() throws Exception { final Channel<String> channel1 = newChannel();
251252253254255256257258259260261
} }).start(); channel3.close(); fib.join(); } @Test public void testSelectReceiveTimeout() throws Exception { final Channel<String> channel1 = newChannel();
284285286287288289290291292293294
Thread.sleep(200); channel1.send("hello"); fib.join(); } @Test public void testSelectReceiveWithTimeoutChannel() throws Exception { final Channel<String> channel1 = newChannel();