From d8715ad2176c8104a41abba3a4d835c473afda8a Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Tue, 10 May 2016 11:43:34 +1000 Subject: [PATCH 1/2] improved test --- .../test/java/org/eclipse/jetty/servlet/PostServletTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/PostServletTest.java b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/PostServletTest.java index db956a07d12..e820b88ce8f 100644 --- a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/PostServletTest.java +++ b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/PostServletTest.java @@ -134,7 +134,7 @@ public class PostServletTest String resp = connector.getResponses(req.toString()); assertThat("resp", resp, containsString("HTTP/1.1 200 ")); assertThat("resp", resp, containsString("chunked")); - assertThat("resp", resp, not(containsString("\r\n0\r\n"))); + assertThat("resp", resp, not(containsString("HTTP/1.1 200 "))); } } } \ No newline at end of file From bdafea3e968b7d5ba62ba549506b6ee3c6a5e9e5 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Wed, 11 May 2016 09:24:02 +1000 Subject: [PATCH 2/2] Issue #561 Fixed test timer --- .../test/java/org/eclipse/jetty/server/GracefulStopTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/GracefulStopTest.java b/jetty-server/src/test/java/org/eclipse/jetty/server/GracefulStopTest.java index 8e67c62bc3e..c5f2ae7990c 100644 --- a/jetty-server/src/test/java/org/eclipse/jetty/server/GracefulStopTest.java +++ b/jetty-server/src/test/java/org/eclipse/jetty/server/GracefulStopTest.java @@ -232,7 +232,7 @@ public class GracefulStopTest assertThat(response2, containsString(" 503 ")); now = TimeUnit.NANOSECONDS.toMillis(System.nanoTime()); - Thread.sleep(end-now); + Thread.sleep(Math.max(1,end-now)); client1.getOutputStream().write("567890".getBytes()); } catch(Exception e)