mirror of https://github.com/apache/druid.git
fix broken server manager tests
This commit is contained in:
parent
070d822345
commit
41347c82bb
|
@ -267,7 +267,7 @@ public class ServerManagerTest
|
||||||
Assert.assertEquals(1, factory.getSegmentReferences().size());
|
Assert.assertEquals(1, factory.getSegmentReferences().size());
|
||||||
|
|
||||||
for (ReferenceCountingSegment referenceCountingSegment : factory.getSegmentReferences()) {
|
for (ReferenceCountingSegment referenceCountingSegment : factory.getSegmentReferences()) {
|
||||||
Assert.assertEquals(0, referenceCountingSegment.getNumReferences());
|
Assert.assertEquals(1, referenceCountingSegment.getNumReferences());
|
||||||
}
|
}
|
||||||
|
|
||||||
queryWaitYieldLatch.countDown();
|
queryWaitYieldLatch.countDown();
|
||||||
|
@ -311,7 +311,7 @@ public class ServerManagerTest
|
||||||
|
|
||||||
queryWaitYieldLatch.countDown();
|
queryWaitYieldLatch.countDown();
|
||||||
|
|
||||||
Assert.assertTrue(factory.getAdapters().size() == 1);
|
Assert.assertEquals(1, factory.getAdapters().size());
|
||||||
|
|
||||||
for (SegmentForTesting segmentForTesting : factory.getAdapters()) {
|
for (SegmentForTesting segmentForTesting : factory.getAdapters()) {
|
||||||
Assert.assertFalse(segmentForTesting.isClosed());
|
Assert.assertFalse(segmentForTesting.isClosed());
|
||||||
|
@ -346,7 +346,15 @@ public class ServerManagerTest
|
||||||
|
|
||||||
queryNotifyLatch.await();
|
queryNotifyLatch.await();
|
||||||
|
|
||||||
Assert.assertTrue(factory.getAdapters().size() == 1);
|
Assert.assertEquals(1, factory.getSegmentReferences().size());
|
||||||
|
|
||||||
|
for (ReferenceCountingSegment referenceCountingSegment : factory.getSegmentReferences()) {
|
||||||
|
Assert.assertEquals(1, referenceCountingSegment.getNumReferences());
|
||||||
|
}
|
||||||
|
|
||||||
|
queryWaitYieldLatch.countDown();
|
||||||
|
|
||||||
|
Assert.assertEquals(1, factory.getAdapters().size());
|
||||||
|
|
||||||
for (SegmentForTesting segmentForTesting : factory.getAdapters()) {
|
for (SegmentForTesting segmentForTesting : factory.getAdapters()) {
|
||||||
Assert.assertFalse(segmentForTesting.isClosed());
|
Assert.assertFalse(segmentForTesting.isClosed());
|
||||||
|
|
Loading…
Reference in New Issue