From d3b81e53721f94e06b722cb8c75e7129c8654f2f Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Tue, 29 May 2018 12:41:19 +0200 Subject: [PATCH] Fix for #2583 Signed-off-by: Greg Wilkins --- .../org/eclipse/jetty/servlet/AsyncServletTest.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncServletTest.java b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncServletTest.java index ed24ffd76fa..ece87c40379 100644 --- a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncServletTest.java +++ b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncServletTest.java @@ -53,6 +53,7 @@ import javax.servlet.http.HttpServletResponseWrapper; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.DebugListener; import org.eclipse.jetty.server.HttpChannel; +import org.eclipse.jetty.server.HttpChannel.Listener; import org.eclipse.jetty.server.QuietServletException; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.RequestLog; @@ -134,6 +135,16 @@ public class AsyncServletTest _port=_connector.getLocalPort(); __history.clear(); __latch=new CountDownLatch(1); + + _connector.addBean(new HttpChannel.Listener() + { + @Override + public void onComplete(Request request) + { + __latch.countDown(); + } + + }); } @After @@ -1073,7 +1084,6 @@ public class AsyncServletTest public void onComplete(AsyncEvent event) throws IOException { historyAdd("onComplete"); - __latch.countDown(); } };