From 070d8223457a735cfada3f3951a053f4f3a3baab Mon Sep 17 00:00:00 2001 From: fjy Date: Tue, 13 Aug 2013 12:01:24 -0700 Subject: [PATCH] fix broken UT --- .../metamx/druid/coordination/ServerManagerTest.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/server/src/test/java/com/metamx/druid/coordination/ServerManagerTest.java b/server/src/test/java/com/metamx/druid/coordination/ServerManagerTest.java index 4d3bbbb7fd7..e791eba8764 100644 --- a/server/src/test/java/com/metamx/druid/coordination/ServerManagerTest.java +++ b/server/src/test/java/com/metamx/druid/coordination/ServerManagerTest.java @@ -264,6 +264,14 @@ public class ServerManagerTest queryNotifyLatch.await(); + Assert.assertEquals(1, factory.getSegmentReferences().size()); + + for (ReferenceCountingSegment referenceCountingSegment : factory.getSegmentReferences()) { + Assert.assertEquals(0, referenceCountingSegment.getNumReferences()); + } + + queryWaitYieldLatch.countDown(); + Assert.assertTrue(factory.getAdapters().size() == 1); for (SegmentForTesting segmentForTesting : factory.getAdapters()) { @@ -295,7 +303,7 @@ public class ServerManagerTest queryNotifyLatch.await(); - Assert.assertTrue(factory.getSegmentReferences().size() == 1); + Assert.assertEquals(1, factory.getSegmentReferences().size()); for (ReferenceCountingSegment referenceCountingSegment : factory.getSegmentReferences()) { Assert.assertEquals(1, referenceCountingSegment.getNumReferences());