From f4d019def4e3dfd901f47e5ffdafef205af5e25e Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Thu, 13 Jul 2017 09:38:10 -0700 Subject: [PATCH] Fixing websocket tests to use new Jetty 10.x webapp configuration style --- .../jetty/websocket/tests/WSServer.java | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/jetty-websocket/websocket-tests/src/main/java/org/eclipse/jetty/websocket/tests/WSServer.java b/jetty-websocket/websocket-tests/src/main/java/org/eclipse/jetty/websocket/tests/WSServer.java index 2ad17bed8f8..a3acdfb83a5 100644 --- a/jetty-websocket/websocket-tests/src/main/java/org/eclipse/jetty/websocket/tests/WSServer.java +++ b/jetty-websocket/websocket-tests/src/main/java/org/eclipse/jetty/websocket/tests/WSServer.java @@ -29,7 +29,6 @@ import java.net.URL; import java.nio.file.Path; import org.eclipse.jetty.annotations.AnnotationConfiguration; -import org.eclipse.jetty.plus.webapp.EnvConfiguration; import org.eclipse.jetty.plus.webapp.PlusConfiguration; import org.eclipse.jetty.server.Handler; import org.eclipse.jetty.server.Server; @@ -43,12 +42,8 @@ import org.eclipse.jetty.toolchain.test.TestingDir; import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Logger; import org.eclipse.jetty.util.resource.PathResource; -import org.eclipse.jetty.webapp.Configuration; -import org.eclipse.jetty.webapp.FragmentConfiguration; -import org.eclipse.jetty.webapp.MetaInfConfiguration; import org.eclipse.jetty.webapp.WebAppContext; -import org.eclipse.jetty.webapp.WebInfConfiguration; -import org.eclipse.jetty.webapp.WebXmlConfiguration; +import org.eclipse.jetty.webapp.WebSocketConfiguration; /** * Utility to build out exploded directory WebApps, in the /target/tests/ directory, for testing out servers that use javax.websocket endpoints. @@ -140,14 +135,9 @@ public class WSServer extends LocalServer implements LocalFuzzer.Provider context.setBaseResource(new PathResource(this.contextDir)); context.setAttribute("org.eclipse.jetty.websocket.jsr356", Boolean.TRUE); - context.setConfigurations(new Configuration[] { - new AnnotationConfiguration(), - new WebXmlConfiguration(), - new WebInfConfiguration(), - new PlusConfiguration(), - new MetaInfConfiguration(), - new FragmentConfiguration(), - new EnvConfiguration()}); + context.addConfiguration(new AnnotationConfiguration()); + context.addConfiguration(new PlusConfiguration()); + context.addConfiguration(new WebSocketConfiguration()); return context; }