curator.create().creatingParentsIfNeeded().withMode(CreateMode.EPHEMERAL).forPath("/container/billy", new byte[]{}); Assert.assertTrue(timing.awaitLatch(containerLatch)); strategy.setNewContainerLatch(null); curator.create().withMode(CreateMode.EPHEMERAL).forPath("/inventory/billy/bob", Ints.toByteArray(2287)); Assert.assertTrue(timing.awaitLatch(inventoryLatch)); strategy.setNewInventoryLatch(null); curator.delete().forPath("/inventory/billy/1"); Assert.assertTrue(timing.awaitLatch(deleteLatch)); strategy.setDeadInventoryLatch(null); curator.create().withMode(CreateMode.EPHEMERAL).forPath("/inventory/billy/1", Ints.toByteArray(100)); Assert.assertTrue(timing.awaitLatch(inventoryLatch)); strategy.setNewInventoryLatch(null); Assert.assertTrue(timing.awaitLatch(latch));
announceSegmentForServer(druidServers.get(i), segments.get(i), zkPathsConfig, jsonMapper); Assert.assertTrue(timing.forWaiting().awaitLatch(segmentViewInitLatch)); Assert.assertTrue(timing.forWaiting().awaitLatch(segmentAddedLatch)); Assert.assertTrue(timing.forWaiting().awaitLatch(segmentRemovedLatch)); Assert.assertTrue(timing.forWaiting().awaitLatch(segmentRemovedLatch));
announceSegmentForServer(druidServers.get(i), segments.get(i), zkPathsConfig, jsonMapper); Assert.assertTrue(timing.forWaiting().awaitLatch(segmentViewInitLatch)); Assert.assertTrue(timing.forWaiting().awaitLatch(segmentAddedLatch)); Assert.assertTrue(timing.forWaiting().awaitLatch(segmentRemovedLatch)); Assert.assertTrue(timing.forWaiting().awaitLatch(segmentRemovedLatch));
Assert.assertTrue(timing.forWaiting().awaitLatch(loadRequestSignal)); Assert.assertNotNull(curator.checkExists().forPath(loadRequestPath)); Assert.assertEquals( Assert.assertTrue(timing.forWaiting().awaitLatch(segmentLoadedSignal)); Assert.assertEquals(0, loadQueuePeon.getSegmentsToLoad().size()); Assert.assertEquals(0L, loadQueuePeon.getLoadQueueSize());
Assert.assertTrue(timing.forWaiting().awaitLatch(dropRequestSignal[requestSignalIdx.get()])); Assert.assertNotNull(curator.checkExists().forPath(dropRequestPath)); Assert.assertEquals( Assert.assertTrue(timing.forWaiting().awaitLatch(segmentDroppedSignal[segmentSignalIdx.get()])); Assert.assertTrue(timing.forWaiting().awaitLatch(loadRequestSignal[requestSignalIdx.get()])); Assert.assertNotNull(curator.checkExists().forPath(loadRequestPath)); Assert.assertEquals( Assert.assertTrue(timing.forWaiting().awaitLatch(segmentLoadedSignal[segmentSignalIdx.get()]));
Assert.assertTrue(timing.forWaiting().awaitLatch(segmentViewInitLatch)); Assert.assertTrue(timing.forWaiting().awaitLatch(segmentAddedLatch)); destinationLoadQueueChildrenCache.start(PathChildrenCache.StartMode.POST_INITIALIZED_EVENT); Assert.assertTrue(timing.forWaiting().awaitLatch(srcCountdown)); Assert.assertTrue(timing.forWaiting().awaitLatch(destCountdown)); Assert.assertTrue(timing.forWaiting().awaitLatch(segmentAddedLatch)); Assert.assertTrue(timing.forWaiting().awaitLatch(segmentRemovedLatch));
KillSession.kill(curator.getZookeeperClient().getZooKeeper(), server.getConnectString()); Assert.assertTrue(timing.forWaiting().awaitLatch(latch));
Assert.assertTrue("Wait for /test1 to be created", timing.forWaiting().awaitLatch(latch));
timing.forWaiting().awaitLatch(removeCallbackLatch);
Assert.assertTrue(timing.forWaiting().awaitLatch(segmentViewInitLatch)); Assert.assertTrue(timing.forWaiting().awaitLatch(segmentAddedLatch)); Assert.assertTrue(timing.forWaiting().awaitLatch(segmentRemovedLatch));
Assert.assertTrue(timing.forWaiting().awaitLatch(segmentViewInitLatch)); Assert.assertTrue(timing.forWaiting().awaitLatch(segmentAddedLatch)); Assert.assertTrue(timing.forWaiting().awaitLatch(segmentRemovedLatch));