From a107ac3b8a597ee6c83a824a1668d9d35d2ea5a8 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Fri, 10 Aug 2018 11:14:10 -0500 Subject: [PATCH] Ensure Client ContainerProvider behavior is reset properly. Signed-off-by: Joakim Erdfelt --- .../jsr356/server/DelayedStartClientOnServerTest.java | 2 +- .../jsr356/server/LargeNestedClientContainerTest.java | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/DelayedStartClientOnServerTest.java b/jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/DelayedStartClientOnServerTest.java index 00f442554de..1231baefa5d 100644 --- a/jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/DelayedStartClientOnServerTest.java +++ b/jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/DelayedStartClientOnServerTest.java @@ -73,7 +73,7 @@ public class DelayedStartClientOnServerTest return msg; } } - + /** * Using the Client specific techniques of JSR356, connect to the echo socket * and perform an echo request. diff --git a/jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/LargeNestedClientContainerTest.java b/jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/LargeNestedClientContainerTest.java index db98e2e9d52..012c590cf36 100644 --- a/jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/LargeNestedClientContainerTest.java +++ b/jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/LargeNestedClientContainerTest.java @@ -34,7 +34,9 @@ import org.eclipse.jetty.toolchain.test.MavenTestingUtils; import org.eclipse.jetty.webapp.WebAppContext; import org.eclipse.jetty.websocket.api.WebSocketBehavior; import org.eclipse.jetty.websocket.api.WebSocketPolicy; +import org.eclipse.jetty.websocket.jsr356.JettyClientContainerProvider; import org.eclipse.jetty.websocket.jsr356.server.samples.echo.LargeEchoAnnotatedSocket; +import org.junit.After; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; @@ -111,6 +113,13 @@ public class LargeNestedClientContainerTest return scenarios; } + @After + public void resetClientContainerProvider() + { + JettyClientContainerProvider.useServerContainer(false); + JettyClientContainerProvider.useSingleton(false); + } + private static final AtomicInteger appDirIdx = new AtomicInteger(0); @Parameterized.Parameter