From 292a9fb52c10d352141328bf70772049c86ba4c6 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Sun, 16 May 2021 08:35:53 +1000 Subject: [PATCH] Fixes #2627 - Improve QoSFilterTest (#6120) * Fixes #2627 Reenable disabled test with longer sleep time Signed-off-by: Greg Wilkins * update from review Signed-off-by: Greg Wilkins --- .../eclipse/jetty/servlets/QoSFilterTest.java | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/QoSFilterTest.java b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/QoSFilterTest.java index 78c54bcc1b6..cef93186be7 100644 --- a/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/QoSFilterTest.java +++ b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/QoSFilterTest.java @@ -41,7 +41,6 @@ import org.eclipse.jetty.util.component.LifeCycle; 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.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -100,13 +99,9 @@ public class QoSFilterTest rethrowExceptions(futures); - if (TestServlet.__maxSleepers <= maxQos) - LOG.warn("TEST WAS NOT PARALLEL ENOUGH!"); - else - assertThat(TestServlet.__maxSleepers, Matchers.lessThanOrEqualTo(numConnections)); + assertThat(TestServlet.__maxSleepers, Matchers.lessThanOrEqualTo(numConnections)); } - @Disabled("Issue #2627") @Test public void testBlockingQosFilter() throws Exception { @@ -126,10 +121,7 @@ public class QoSFilterTest rethrowExceptions(futures); - if (TestServlet.__maxSleepers < maxQos) - LOG.warn("TEST WAS NOT PARALLEL ENOUGH!"); - else - assertEquals(TestServlet.__maxSleepers, maxQos); + assertEquals(TestServlet.__maxSleepers, maxQos); } @Test @@ -151,10 +143,7 @@ public class QoSFilterTest rethrowExceptions(futures); - if (TestServlet.__maxSleepers < maxQos) - LOG.warn("TEST WAS NOT PARALLEL ENOUGH!"); - else - assertEquals(TestServlet.__maxSleepers, maxQos); + assertEquals(TestServlet.__maxSleepers, maxQos); } private void rethrowExceptions(List> futures) throws Exception