From 386dfc03318bb8af17b733621a46393228e37fef Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Tue, 20 Feb 2018 11:32:49 +1100 Subject: [PATCH] less fragile tests Signed-off-by: Greg Wilkins --- .../java/org/eclipse/jetty/util/thread/SchedulerTest.java | 4 ++-- .../org/eclipse/jetty/http/client/AsyncIOServletTest.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/thread/SchedulerTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/thread/SchedulerTest.java index 7a74b9b42f5..56a9e552512 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/thread/SchedulerTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/thread/SchedulerTest.java @@ -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()); } diff --git a/tests/test-http-client-transport/src/test/java/org/eclipse/jetty/http/client/AsyncIOServletTest.java b/tests/test-http-client-transport/src/test/java/org/eclipse/jetty/http/client/AsyncIOServletTest.java index f2440dcc27c..58a06d05245 100644 --- a/tests/test-http-client-transport/src/test/java/org/eclipse/jetty/http/client/AsyncIOServletTest.java +++ b/tests/test-http-client-transport/src/test/java/org/eclipse/jetty/http/client/AsyncIOServletTest.java @@ -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