fix test timeout

This commit is contained in:
Xavier Léauté 2014-12-23 16:25:38 -08:00
parent 7a9bf85230
commit 574ab3017c
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); EasyMock.verify(announcer, segmentPublisher, dataSegmentPusher, serverView, emitter);
} }
@Test @Test(timeout = 60000)
public void testPersist() throws Exception public void testPersist() throws Exception
{ {
final MutableBoolean committed = new MutableBoolean(false); final MutableBoolean committed = new MutableBoolean(false);
@ -212,12 +212,8 @@ public class RealtimePlumberSchoolTest
} }
); );
Stopwatch stopwatch = Stopwatch.createStarted();
while (!committed.booleanValue()) { while (!committed.booleanValue()) {
Thread.sleep(100); Thread.sleep(100);
if (stopwatch.elapsed(TimeUnit.MILLISECONDS) > 1000) {
throw new ISE("Taking too long to set perist value");
}
} }
plumber.getSinks().clear(); plumber.getSinks().clear();
plumber.finishJob(); plumber.finishJob();