mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-05 00:56:58 +08:00
Fix flaky SampleJettyApplicationTests
See gh-33553
This commit is contained in:
parent
de699b4d11
commit
93a4e303be
@ -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<String> 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
|
||||
|
Loading…
Reference in New Issue
Block a user