Lines Matching defs:latch
167 final CountDownLatch latch = new CountDownLatch(1);
168 doCountDown(latch).when(mock).onSynthesizeText(LittleMock.<SynthesisRequest>anyObject(),
172 awaitCountDown(latch, 5, TimeUnit.SECONDS);
180 final CountDownLatch latch = new CountDownLatch(1);
181 doCountDown(latch).when(listener).onInit(errorCode);
186 awaitCountDown(latch, 5, TimeUnit.SECONDS);
194 public static CountDownBehaviour doCountDown(final CountDownLatch latch) {
201 latch.countDown();
215 latch.countDown();
225 public static void awaitCountDown(CountDownLatch latch, long timeout, TimeUnit unit)
227 Assert.assertTrue("Waited too long for method call", latch.await(timeout, unit));