From b772f4c8f015fdd91a64e16a7c48a74b18108c76 Mon Sep 17 00:00:00 2001 From: Ilia Motornyi Date: Thu, 9 Feb 2017 09:26:19 +0200 Subject: [PATCH] Server integration fix 3 (#8442) * Fix JBoss 6 integration test * Fixes for Karaf (build self-contained WAB) --- test/servlet-containers/generic/pom.xml | 42 ++++++++++++++++++- .../tests/IntegrationTestUIProvider.java | 19 --------- .../java/com/vaadin/tests/JSR356Servlet.java | 18 ++++++++ .../tests/ServerIntegrationTestServlet.java | 14 +++++++ tests/screenshots | 2 +- 5 files changed, 73 insertions(+), 22 deletions(-) create mode 100644 test/servlet-containers/generic/src/main/java/com/vaadin/tests/JSR356Servlet.java create mode 100644 test/servlet-containers/generic/src/main/java/com/vaadin/tests/ServerIntegrationTestServlet.java diff --git a/test/servlet-containers/generic/pom.xml b/test/servlet-containers/generic/pom.xml index 8ff752483c..4c1c9b8292 100644 --- a/test/servlet-containers/generic/pom.xml +++ b/test/servlet-containers/generic/pom.xml @@ -11,6 +11,9 @@ vaadin-test-generic-integration vaadin-test-generic-integration war + + 8.0.0 + @@ -26,12 +29,16 @@ com.vaadin - vaadin-push + vaadin-compatibility-themes com.vaadin vaadin-client-compiled + + com.vaadin + vaadin-push + com.vaadin vaadin-uitest-common @@ -67,6 +74,11 @@ maven-war-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + @@ -86,7 +98,33 @@ + + org.apache.felix + maven-bundle-plugin + 3.0.1 + true + + + ${project.groupId}.${project.artifactId} + ${project.name} + ${osgi.bundle.version} + javax.servlet,javax.servlet.http,javax.websocket,javax.websocket.server,!com.vaadin.*,* + run + + + war + + + + + osgi-manifest + process-classes + + manifest + + + + - diff --git a/test/servlet-containers/generic/src/main/java/com/vaadin/tests/IntegrationTestUIProvider.java b/test/servlet-containers/generic/src/main/java/com/vaadin/tests/IntegrationTestUIProvider.java index ce64c22577..6f265b10f7 100644 --- a/test/servlet-containers/generic/src/main/java/com/vaadin/tests/IntegrationTestUIProvider.java +++ b/test/servlet-containers/generic/src/main/java/com/vaadin/tests/IntegrationTestUIProvider.java @@ -1,14 +1,7 @@ package com.vaadin.tests; -import javax.servlet.annotation.WebInitParam; -import javax.servlet.annotation.WebServlet; - -import com.vaadin.annotations.VaadinServletConfiguration; import com.vaadin.server.UIClassSelectionEvent; import com.vaadin.server.UIProvider; -import com.vaadin.server.VaadinServlet; -import com.vaadin.tests.integration.ServletIntegrationUI; -import com.vaadin.tests.integration.ServletIntegrationWebsocketUI; import com.vaadin.tests.integration.push.BasicPush; import com.vaadin.ui.UI; @@ -62,16 +55,4 @@ public class IntegrationTestUIProvider extends UIProvider { } } - @WebServlet(urlPatterns = "/*", name = "IntegrationTestUIProvider", asyncSupported = true, initParams = { - @WebInitParam(name = "UIProvider", value = "com.vaadin.tests.IntegrationTestUIProvider") }) - @VaadinServletConfiguration(ui = ServletIntegrationUI.class, productionMode = false) - public static class MyServlet extends VaadinServlet { - } - - @WebServlet(urlPatterns = "/run-jsr356/*", name = "IntegrationUIProvider-Jsr356", asyncSupported = false, initParams = { - @WebInitParam(name = "org.atmosphere.cpr.asyncSupport", value = "org.atmosphere.container.JSR356AsyncSupport") }) - @VaadinServletConfiguration(ui = ServletIntegrationWebsocketUI.class, productionMode = false) - public static class JSR356Servlet extends VaadinServlet { - - } } diff --git a/test/servlet-containers/generic/src/main/java/com/vaadin/tests/JSR356Servlet.java b/test/servlet-containers/generic/src/main/java/com/vaadin/tests/JSR356Servlet.java new file mode 100644 index 0000000000..1a6c138f36 --- /dev/null +++ b/test/servlet-containers/generic/src/main/java/com/vaadin/tests/JSR356Servlet.java @@ -0,0 +1,18 @@ +package com.vaadin.tests; + +import com.vaadin.annotations.VaadinServletConfiguration; +import com.vaadin.server.VaadinServlet; +import com.vaadin.tests.integration.ServletIntegrationWebsocketUI; + +import javax.servlet.annotation.WebInitParam; +import javax.servlet.annotation.WebServlet; + +/** + * Created by elmot on 06-02-2017. + */ +@WebServlet(urlPatterns = "/run-jsr356/*", name = "IntegrationUIProvider-Jsr356", asyncSupported = false, initParams = { + @WebInitParam(name = "org.atmosphere.cpr.asyncSupport", value = "org.atmosphere.container.JSR356AsyncSupport")}) +@VaadinServletConfiguration(ui = ServletIntegrationWebsocketUI.class, productionMode = false) +public class JSR356Servlet extends VaadinServlet { + +} diff --git a/test/servlet-containers/generic/src/main/java/com/vaadin/tests/ServerIntegrationTestServlet.java b/test/servlet-containers/generic/src/main/java/com/vaadin/tests/ServerIntegrationTestServlet.java new file mode 100644 index 0000000000..9ca79b31a8 --- /dev/null +++ b/test/servlet-containers/generic/src/main/java/com/vaadin/tests/ServerIntegrationTestServlet.java @@ -0,0 +1,14 @@ +package com.vaadin.tests; + +import com.vaadin.annotations.VaadinServletConfiguration; +import com.vaadin.server.VaadinServlet; +import com.vaadin.tests.integration.ServletIntegrationUI; + +import javax.servlet.annotation.WebInitParam; +import javax.servlet.annotation.WebServlet; + +@WebServlet(urlPatterns = "/*" ,name = "IntegrationTestUIProvider", asyncSupported = true, initParams = { + @WebInitParam(name = "UIProvider", value = "com.vaadin.tests.IntegrationTestUIProvider")}) +@VaadinServletConfiguration(ui = ServletIntegrationUI.class, productionMode = false) +public class ServerIntegrationTestServlet extends VaadinServlet { +} diff --git a/tests/screenshots b/tests/screenshots index 6c55a431f5..80b5030c7b 160000 --- a/tests/screenshots +++ b/tests/screenshots @@ -1 +1 @@ -Subproject commit 6c55a431f54574a8df254f8ac7003cf498c91d27 +Subproject commit 80b5030c7b7e395d7a421dcd238df670f02b41a7 -- 2.39.5