Merge pull request #994 from metamx/fix-test-timeout

fix test timeout
This commit is contained in:
Fangjin Yang 2014-12-30 17:17:44 -08:00
commit 2e63bcd020
1 changed files with 1 additions and 5 deletions

View File

@ -190,7 +190,7 @@ public class RealtimePlumberSchoolTest
EasyMock.verify(announcer, segmentPublisher, dataSegmentPusher, serverView, emitter);
}
@Test
@Test(timeout = 60000)
public void testPersist() throws Exception
{
final MutableBoolean committed = new MutableBoolean(false);
@ -212,12 +212,8 @@ public class RealtimePlumberSchoolTest
}
);
Stopwatch stopwatch = Stopwatch.createStarted();
while (!committed.booleanValue()) {
Thread.sleep(100);
if (stopwatch.elapsed(TimeUnit.MILLISECONDS) > 1000) {
throw new ISE("Taking too long to set perist value");
}
}
plumber.getSinks().clear();
plumber.finishJob();