fix broken server manager tests

This commit is contained in:
fjy 2013-08-13 12:07:45 -07:00
parent 070d822345
commit 41347c82bb
1 changed files with 11 additions and 3 deletions

View File

@ -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());