From 63fd8a1a0061d8f5a749f29a13ba39f5babfa2c3 Mon Sep 17 00:00:00 2001 From: Lachlan Roberts Date: Mon, 16 May 2022 19:06:42 +1000 Subject: [PATCH] fix failure in RequestTest.testMultiPart Signed-off-by: Lachlan Roberts --- .../java/org/eclipse/jetty/ee9/nested/RequestTest.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/jetty-ee9/jetty-ee9-nested/src/test/java/org/eclipse/jetty/ee9/nested/RequestTest.java b/jetty-ee9/jetty-ee9-nested/src/test/java/org/eclipse/jetty/ee9/nested/RequestTest.java index 8dfa0522f44..782f619357b 100644 --- a/jetty-ee9/jetty-ee9-nested/src/test/java/org/eclipse/jetty/ee9/nested/RequestTest.java +++ b/jetty-ee9/jetty-ee9-nested/src/test/java/org/eclipse/jetty/ee9/nested/RequestTest.java @@ -82,7 +82,6 @@ import org.eclipse.jetty.util.IO; import org.hamcrest.Matchers; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.slf4j.Logger; @@ -452,7 +451,6 @@ public class RequestTest assertThat(response, containsString(" 200 OK")); } - @Disabled @Test public void testMultiPart() throws Exception { @@ -494,7 +492,9 @@ public class RequestTest LocalEndPoint endPoint = _connector.connect(); endPoint.addInput(request); - assertThat(endPoint.getResponse(), startsWith("HTTP/1.1 200")); + String response = endPoint.getResponse(); + assertThat(response, startsWith("HTTP/1.1 200")); + assertThat(response, containsString("Violation: TRANSFER_ENCODING")); // We know the previous request has completed if another request can be processed on the same connection. String cleanupRequest = "GET /foo/cleanup HTTP/1.1\r\n" + @@ -503,9 +503,8 @@ public class RequestTest "\r\n"; endPoint.addInput(cleanupRequest); - String response = endPoint.getResponse(); + response = endPoint.getResponse(); assertTrue(response.startsWith("HTTP/1.1 200")); - assertThat(response, containsString("Violation: TRANSFER_ENCODING")); assertThat("File Count in dir: " + testTmpDir, getFileCount(testTmpDir), is(0L)); }