summaryrefslogtreecommitdiffstats
path: root/server/tests/src/com/vaadin
diff options
context:
space:
mode:
authorMaciej Przepióra <matthew@vaadin.com>2014-10-22 15:28:15 +0300
committerSauli Tähkäpää <sauli@vaadin.com>2014-11-10 13:14:28 +0200
commit5b76975df4216f48710476b44f1013bbed47f6d2 (patch)
tree9687d83dbf1bfc88148a47ccc1d6532ba25c55f1 /server/tests/src/com/vaadin
parent3d7888dfd73266453bb561cd6b083874748ec73a (diff)
downloadvaadin-framework-5b76975df4216f48710476b44f1013bbed47f6d2.tar.gz
vaadin-framework-5b76975df4216f48710476b44f1013bbed47f6d2.zip
Change the way classloader for VaadinService is selected (fixes #11295)
Change-Id: I2a25b4149f927ee7940edf596e8cebaaa48dcd0d
Diffstat (limited to 'server/tests/src/com/vaadin')
-rw-r--r--server/tests/src/com/vaadin/tests/server/CsrfTokenMissingTestServer.java7
-rw-r--r--server/tests/src/com/vaadin/tests/server/TestClassesSerializable.java2
-rw-r--r--server/tests/src/com/vaadin/tests/server/TestStreamVariableMapping.java2
3 files changed, 9 insertions, 2 deletions
diff --git a/server/tests/src/com/vaadin/tests/server/CsrfTokenMissingTestServer.java b/server/tests/src/com/vaadin/tests/server/CsrfTokenMissingTestServer.java
index 30f1c85fef..59bb712907 100644
--- a/server/tests/src/com/vaadin/tests/server/CsrfTokenMissingTestServer.java
+++ b/server/tests/src/com/vaadin/tests/server/CsrfTokenMissingTestServer.java
@@ -19,6 +19,7 @@ import java.util.UUID;
import java.util.logging.Level;
import java.util.logging.Logger;
+import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import org.easymock.EasyMock;
@@ -27,6 +28,7 @@ import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
+import com.vaadin.server.MockServletConfig;
import com.vaadin.server.ServiceException;
import com.vaadin.server.VaadinService;
import com.vaadin.server.VaadinServlet;
@@ -38,6 +40,7 @@ import com.vaadin.shared.ApplicationConstants;
import com.vaadin.tests.util.AlwaysLockedVaadinSession;
import com.vaadin.tests.util.MockDeploymentConfiguration;
+
/**
* Test the actual csrf token validation by the server.
*
@@ -62,10 +65,12 @@ public class CsrfTokenMissingTestServer {
/**
* Initialize the mock servlet and other stuff for our tests.
+ *
*/
@Before
- public void initMockStuff() throws ServiceException {
+ public void initMockStuff() throws ServiceException, ServletException {
mockServlet = new VaadinServlet();
+ mockServlet.init(new MockServletConfig());
mockDeploymentConfiguration = new MockDeploymentConfiguration();
mockService = new VaadinServletService(mockServlet,
diff --git a/server/tests/src/com/vaadin/tests/server/TestClassesSerializable.java b/server/tests/src/com/vaadin/tests/server/TestClassesSerializable.java
index 63f79504ff..10cc7634fd 100644
--- a/server/tests/src/com/vaadin/tests/server/TestClassesSerializable.java
+++ b/server/tests/src/com/vaadin/tests/server/TestClassesSerializable.java
@@ -47,6 +47,8 @@ public class TestClassesSerializable extends TestCase {
"com\\.vaadin\\.server\\.MockServletConfig", //
"com\\.vaadin\\.server\\.MockServletContext", //
"com\\.vaadin\\.server\\.Constants", //
+ "com\\.vaadin\\.server\\.VaadinServiceClassLoaderUtil", //
+ "com\\.vaadin\\.server\\.VaadinServiceClassLoaderUtil\\$GetClassLoaderPrivilegedAction", //
"com\\.vaadin\\.server\\.communication\\.FileUploadHandler\\$SimpleMultiPartInputStream", //
"com\\.vaadin\\.server\\.communication\\.PushRequestHandler.*",
"com\\.vaadin\\.server\\.communication\\.PushHandler.*", // PushHandler
diff --git a/server/tests/src/com/vaadin/tests/server/TestStreamVariableMapping.java b/server/tests/src/com/vaadin/tests/server/TestStreamVariableMapping.java
index fcc54a989d..b2faca1ed6 100644
--- a/server/tests/src/com/vaadin/tests/server/TestStreamVariableMapping.java
+++ b/server/tests/src/com/vaadin/tests/server/TestStreamVariableMapping.java
@@ -80,11 +80,11 @@ public class TestStreamVariableMapping extends TestCase {
private LegacyCommunicationManager createCommunicationManager()
throws Exception {
VaadinServlet servlet = new VaadinServlet();
+ servlet.init(new MockServletConfig());
VaadinServletService vss = new VaadinServletService(servlet,
new MockDeploymentConfiguration());
servlet.init(new MockServletConfig());
return new LegacyCommunicationManager(
new AlwaysLockedVaadinSession(vss));
}
-
}