From dfca1086030c5948291c7e33004f8e3136565f24 Mon Sep 17 00:00:00 2001 From: gregw Date: Tue, 6 Jun 2023 09:33:27 +0200 Subject: [PATCH] Update test --- .../test/java/org/eclipse/jetty/server/LargeHeaderTest.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/LargeHeaderTest.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/LargeHeaderTest.java index 1f90b8e1a45..9354c773de8 100644 --- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/LargeHeaderTest.java +++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/LargeHeaderTest.java @@ -35,6 +35,7 @@ import org.eclipse.jetty.http.MimeTypes; import org.eclipse.jetty.util.BufferUtil; import org.eclipse.jetty.util.Callback; import org.eclipse.jetty.util.IO; +import org.eclipse.jetty.util.NanoTime; import org.eclipse.jetty.util.component.LifeCycle; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; @@ -158,7 +159,6 @@ public class LargeHeaderTest output.flush(); String rawResponse = readResponse(client, 1, input); - System.err.println(rawResponse); assertThat(rawResponse, containsString(" 500 ")); } } @@ -284,7 +284,11 @@ public class LargeHeaderTest output.write(rawRequest.formatted(count).getBytes(UTF_8)); output.flush(); + long start = NanoTime.now(); String rawResponse = readResponse(client, count, input); + if (NanoTime.secondsSince(start) >= 1) + LOG.warn("X-Count: {} - Slow Response", count); + if (rawResponse.isEmpty()) { LOG.warn("X-Count: {} - Empty Raw Response", count);