less fragile tests

Signed-off-by: Greg Wilkins <gregw@webtide.com>
This commit is contained in:
Greg Wilkins 2018-02-20 11:32:49 +11:00
parent b94d26a720
commit 386dfc0331
2 changed files with 5 additions and 5 deletions

View File

@ -164,9 +164,9 @@ public class SchedulerTest
}
},2000,TimeUnit.MILLISECONDS);
Thread.sleep(1600);
Thread.sleep(100);
Assert.assertTrue(task.cancel());
Thread.sleep(1000);
Thread.sleep(2500);
Assert.assertEquals(0,executed.get());
}

View File

@ -455,7 +455,7 @@ public class AsyncIOServletTest extends AbstractTest
// Wait for the failure to arrive to
// the server while we are about to write.
sleep(1000);
sleep(2000);
out.write(data);
}
@ -485,8 +485,8 @@ public class AsyncIOServletTest extends AbstractTest
clientLatch.countDown();
});
assertTrue(errorLatch.await(5, TimeUnit.SECONDS));
assertTrue(clientLatch.await(5, TimeUnit.SECONDS));
assertTrue(errorLatch.await(10, TimeUnit.SECONDS));
assertTrue(clientLatch.await(10, TimeUnit.SECONDS));
}
@Test