From 0f23af315c64159ba86f58bbfb87cd1d04694de7 Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Wed, 30 May 2018 18:15:04 +0200 Subject: [PATCH] Issue #2599 Fix AsyncServletIOTest Signed-off-by: Jan Bartel --- .../java/org/eclipse/jetty/servlet/AsyncServletIOTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncServletIOTest.java b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncServletIOTest.java index ea747cfa5cb..1552f524254 100644 --- a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncServletIOTest.java +++ b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncServletIOTest.java @@ -21,6 +21,7 @@ package org.eclipse.jetty.servlet; import static java.nio.charset.StandardCharsets.ISO_8859_1; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.not; +import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.greaterThanOrEqualTo; import static org.hamcrest.Matchers.startsWith; import static org.junit.Assert.assertEquals; @@ -695,7 +696,8 @@ public class AsyncServletIOTest LOG.debug("last: "+last); // last non empty line should not contain end chunk - assertThat(last,not(containsString("0"))); + assertThat(last, notNullValue()); + assertThat(last.trim(),not(startsWith("0"))); } assertTrue(_servlet4.completed.await(5, TimeUnit.SECONDS));