This commit is contained in:
Jacky 2017-12-19 21:00:03 -05:00
parent eeb8ade5c0
commit cce3ab6240

View File

@ -141,6 +141,7 @@ public class UrlFetchingTests extends RefineTest {
Process process = op.createProcess(project, options); Process process = op.createProcess(project, options);
process.startPerforming(pm); process.startPerforming(pm);
Assert.assertTrue(process.isRunning()); Assert.assertTrue(process.isRunning());
for(int i = 0;i < 12;i++) {
try { try {
// We have 100 rows and 500 ms per row but only two distinct // We have 100 rows and 500 ms per row but only two distinct
// values so we should not wait more than ~2000 ms to get the // values so we should not wait more than ~2000 ms to get the
@ -148,9 +149,12 @@ public class UrlFetchingTests extends RefineTest {
// net latency we sleep for longer (but still less than // net latency we sleep for longer (but still less than
// 50,000ms). // 50,000ms).
Thread.sleep(5000); Thread.sleep(5000);
if (process.isDone())
break;
} catch (InterruptedException e) { } catch (InterruptedException e) {
Assert.fail("Test interrupted"); Assert.fail("Test interrupted");
} }
}
Assert.assertFalse(process.isRunning()); Assert.assertFalse(process.isRunning());
// Inspect rows // Inspect rows