124125126127128129130131132133134
message.writeBytes(new byte[1024]); connection.start(); connectionsEstablished.release(); startTest.acquire(); final int msgs = (MESSAGE_COUNT/PRODUCER_COUNT)+1; for (int i = 0; i < msgs; i++) { pp.increment(); producer.send(message); }
159160161162163164165166167168169
doneLatch.release(); } } }); connection.start(); doneLatch.acquire(); testsFinished.release(); connection.close(); return null; }
20872088208920902091209220932094209520962097
closerThread.start(); assertNull(topicConsumer.receive(1500)); // wait for the closing thread to finish latch.acquire(); } finally { if (consumerConnection != null) {
389390391392393394395396397398399
} } }); if( sync ) { latch.acquire(); } } catch (InterruptedException e) { log.warn("Request to start checkpoint failed: " + e, e); }
8889909192939495969798
} // need extra commit for cases in which the last message index is not a multiple of 10 sess.commit(); latch.acquire(); if (listener.failed) { fail("listener failed: " + listener.getError()); }
388389390391392393394395396397398
3031323334353637
public void doExecute(WorkerContext work, Executor executor) throws WorkException, InterruptedException { Latch latch = work.provideEndLatch(); executor.execute(work); latch.acquire(); } }
public void doExecute(WorkerContext work, Executor executor) throws WorkException, InterruptedException { Latch latch = work.provideStartLatch(); executor.execute(work); latch.acquire(); } }
3334353637383940