325326327328329330331332333334335
assertThat(m1, equalTo(2)); assertThat(m2, equalTo(4)); assertThat(m3, is(nullValue())); fib.join(); } @Test public void testFilterWithTimeouts() throws Exception { final Channel<Integer> ch = newChannel();
363364365366367368369370371372373
ch.send(3); ch.send(4); ch.send(5); ch.close(); fib.join(); } @Test public void testSendFilterFiberToFiber() throws Exception { final Channel<Integer> ch = newChannel();
405406407408409410411412413414415
ch1.close(); } }).start(); fib1.join(); fib2.join(); } @Test public void testSendFilterThreadToFiber() throws Exception { final Channel<Integer> ch = newChannel();
441442443444445446447448449450451
ch1.send(3); ch1.send(4); ch1.send(5); ch1.close(); fib.join(); } @Test public void testSendFilterFiberToThread() throws Exception { final Channel<Integer> ch = newChannel();
479480481482483484485486487488489
assertThat(m1, equalTo(2)); assertThat(m2, equalTo(4)); assertThat(m3, is(nullValue())); fib.join(); } @Test public void testSendFilterWithTimeouts() throws Exception { final Channel<Integer> ch = newChannel();
517518519520521522523524525526527
ch1.send(3); ch1.send(4); ch1.send(5); ch1.close(); fib.join(); } @Test public void testMapThreadToFiber() throws Exception { final Channel<Integer> ch = newChannel();
559560561562563564565566567568569
ch.send(3); ch.send(4); ch.send(5); ch.close(); fib.join(); } @Test public void testSendMapThreadToFiber() throws Exception { final Channel<Integer> ch = newChannel();
601602603604605606607608609610611
ch1.send(3); ch1.send(4); ch1.send(5); ch1.close(); fib.join(); } @Test public void testZipThreadToFiber() throws Exception { final Channel<String> ch1 = newChannel();
640641642643644645646647648649650
ch2.send(2); ch1.send("c"); ch2.send(3); ch1.send("foo"); ch2.close(); fib.join(); } @Test public void testZipWithTimeoutsThreadToFiber() throws Exception { final Channel<String> ch1 = newChannel();
682683684685686687688689690691692
ch2.send(2); ch1.send("c"); ch2.send(3); ch1.send("foo"); ch2.close(); fib.join(); } @Test public void testFlatmapThreadToFiber() throws Exception { final Channel<Integer> ch1 = newChannel();