Merge pull request #868 from metamx/fix-bad-test

fix non-determininistic reference counting segment test
This commit is contained in:
Fangjin Yang 2014-11-20 15:25:57 -07:00
commit 780e4a27f7
1 changed files with 6 additions and 6 deletions

View File

@ -276,7 +276,7 @@ public class ServerManagerTest
) )
); );
queryNotifyLatch.await(25, TimeUnit.MILLISECONDS); queryNotifyLatch.await(1000, TimeUnit.MILLISECONDS);
Assert.assertEquals(1, factory.getSegmentReferences().size()); Assert.assertEquals(1, factory.getSegmentReferences().size());
@ -315,7 +315,7 @@ public class ServerManagerTest
) )
); );
Assert.assertTrue("Operation must complete within 100ms", queryNotifyLatch.await(100, TimeUnit.MILLISECONDS)); queryNotifyLatch.await(1000, TimeUnit.MILLISECONDS);
Assert.assertEquals(1, factory.getSegmentReferences().size()); Assert.assertEquals(1, factory.getSegmentReferences().size());
@ -358,7 +358,7 @@ public class ServerManagerTest
) )
); );
queryNotifyLatch.await(25, TimeUnit.MILLISECONDS); queryNotifyLatch.await(1000, TimeUnit.MILLISECONDS);
Assert.assertEquals(1, factory.getSegmentReferences().size()); Assert.assertEquals(1, factory.getSegmentReferences().size());
@ -392,7 +392,7 @@ public class ServerManagerTest
private void waitForTestVerificationAndCleanup(Future future) private void waitForTestVerificationAndCleanup(Future future)
{ {
try { try {
queryNotifyLatch.await(25, TimeUnit.MILLISECONDS); queryNotifyLatch.await(1000, TimeUnit.MILLISECONDS);
queryWaitYieldLatch.countDown(); queryWaitYieldLatch.countDown();
queryWaitLatch.countDown(); queryWaitLatch.countDown();
future.get(); future.get();
@ -720,7 +720,7 @@ public class ServerManagerTest
notifyLatch.countDown(); notifyLatch.countDown();
try { try {
waitYieldLatch.await(25, TimeUnit.MILLISECONDS); waitYieldLatch.await(1000, TimeUnit.MILLISECONDS);
} }
catch (Exception e) { catch (Exception e) {
throw Throwables.propagate(e); throw Throwables.propagate(e);
@ -733,7 +733,7 @@ public class ServerManagerTest
public OutType get() public OutType get()
{ {
try { try {
waitLatch.await(25, TimeUnit.MILLISECONDS); waitLatch.await(1000, TimeUnit.MILLISECONDS);
} }
catch (Exception e) { catch (Exception e) {
throw Throwables.propagate(e); throw Throwables.propagate(e);