153154155156157158159160161162163
Object o = slot.poll(5000); assertNull(o); // exit the valve valve.leave(); o = slot.take(); assertNotNull(o); assertEquals("CLOSED", o); } public void testSimpleClose2() throws Exception
157158159160161162163164165166167
} try { if( timeout == WAIT_FOREVER_TIMEOUT ) { return (Packet) responseSlot.take(); } else if (timeout == NO_WAIT_TIMEOUT ) { return (Packet) responseSlot.poll(1); } else { return (Packet) responseSlot.poll(timeout); }