3334353637383940
public void doExecute(WorkerContext work, Executor executor) throws WorkException, InterruptedException { Latch latch = work.provideStartLatch(); executor.execute(work); latch.acquire(); } }
146147148149150151152153154155156
} } }, "receiver thread"); receiverThread.start(); latch.acquire(); assertNull(expectedMessage); } public void testReceiveTimeoutPreservation() throws Exception {
219220221222223224225226227228229
} }, "sender thread"); senderThread.start(); senderLatch.acquire(); receiverLatch.acquire(); if (testFailed) { fail("Test failed by the sender thread. Watch for exception in logs");
298299300301302303304305306307308
Thread.sleep(3000); receiverThread.interrupt(); // wait for the reading thread to conclude latch.acquire(); log.trace("Expected message:" + expectedMessage); assertNull(expectedMessage); }
3233343536373839
public void doExecute(WorkerContext work, GeronimoExecutor executor) throws WorkException, InterruptedException { Latch latch = work.provideEndLatch(); executor.execute("A J2EE Connector", work); latch.acquire(); } }
public void doExecute(WorkerContext work, GeronimoExecutor executor) throws WorkException, InterruptedException { Latch latch = work.provideStartLatch(); executor.execute("A J2EE Connector", work); latch.acquire(); } }
403404405406407408409410411412413
} } }); if( sync ) { latch.acquire(); } } catch (InterruptedException e) { log.warn("Request to start checkpoint failed: " + e, e); }
public void doExecute(WorkerContext work, Executor executor) throws WorkException, InterruptedException { Latch latch = work.provideEndLatch(); executor.execute(work); latch.acquire(); } }
141142143144145146147148149150151