Code example for CountDownLatch

Methods: awaitgetCount

0
        ClientWatchManager watcher = mock(ClientWatchManager.class);
        ClientCnxn clientCnxn = new ClientCnxn(
                "tmp", hostProvider, 5000,
                zk, watcher, nioCnxn, false);
        clientCnxn.start();
        countDownLatch.await(5000, TimeUnit.MILLISECONDS);
        Assert.assertTrue(countDownLatch.getCount() == 0);
        clientCnxn.close();
    } 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE