From 93a4e303be649ccb4c3d2ed38ba49f81802fbd23 Mon Sep 17 00:00:00 2001 From: Moritz Halbritter Date: Tue, 31 Jan 2023 12:22:01 +0100 Subject: [PATCH] Fix flaky SampleJettyApplicationTests See gh-33553 --- .../java/smoketest/jetty/SampleJettyApplicationTests.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jetty/src/test/java/smoketest/jetty/SampleJettyApplicationTests.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jetty/src/test/java/smoketest/jetty/SampleJettyApplicationTests.java index 9c4e72df42..e21fadb080 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jetty/src/test/java/smoketest/jetty/SampleJettyApplicationTests.java +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jetty/src/test/java/smoketest/jetty/SampleJettyApplicationTests.java @@ -28,7 +28,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; -import org.springframework.boot.test.system.CapturedOutput; import org.springframework.boot.test.system.OutputCaptureExtension; import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.http.HttpEntity; @@ -79,11 +78,9 @@ class SampleJettyApplicationTests { } @Test - void testMaxHttpResponseHeaderSize(CapturedOutput output) { + void testMaxHttpResponseHeaderSize() { ResponseEntity entity = this.restTemplate.getForEntity("/max-http-response-header", String.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR); - assertThat(output).contains( - "org.eclipse.jetty.server.HttpChannel : handleException /max-http-response-header org.eclipse.jetty.http.BadMessageException: 500: Response header too large"); } @Test