From ed907f8ed9ff1d87406e2343e600e8f9775ad7f3 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Wed, 14 Mar 2018 16:05:16 +1100 Subject: [PATCH] more generous test times Signed-off-by: Greg Wilkins --- .../eclipse/jetty/server/LowResourcesMonitorTest.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/LowResourcesMonitorTest.java b/jetty-server/src/test/java/org/eclipse/jetty/server/LowResourcesMonitorTest.java index ddf14534eff..121ef30d5cf 100644 --- a/jetty-server/src/test/java/org/eclipse/jetty/server/LowResourcesMonitorTest.java +++ b/jetty-server/src/test/java/org/eclipse/jetty/server/LowResourcesMonitorTest.java @@ -218,28 +218,28 @@ public class LowResourcesMonitorTest @Test public void testMaxLowResourceTime() throws Exception { - _lowResourcesMonitor.setMaxLowResourcesTime(2000); + _lowResourcesMonitor.setMaxLowResourcesTime(5000); Assert.assertFalse(_lowResourcesMonitor.isLowOnResources()); try(Socket socket0 = new Socket("localhost",_connector.getLocalPort())) { _lowResourcesMonitor.setMaxMemory(1); - Thread.sleep(1200); + Thread.sleep(2400); Assert.assertTrue(_lowResourcesMonitor.isLowOnResources()); try(Socket socket1 = new Socket("localhost",_connector.getLocalPort())) { - Thread.sleep(1200); + Thread.sleep(2400); Assert.assertTrue(_lowResourcesMonitor.isLowOnResources()); Assert.assertEquals(-1,socket0.getInputStream().read()); socket1.getOutputStream().write("G".getBytes(StandardCharsets.UTF_8)); - Thread.sleep(1200); + Thread.sleep(2400); Assert.assertTrue(_lowResourcesMonitor.isLowOnResources()); socket1.getOutputStream().write("E".getBytes(StandardCharsets.UTF_8)); - Thread.sleep(1200); + Thread.sleep(2400); Assert.assertTrue(_lowResourcesMonitor.isLowOnResources()); Assert.assertEquals(-1,socket1.getInputStream().read()); }