summaryrefslogtreecommitdiffstats
path: root/server/tests
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2013-04-25 15:32:50 +0300
committerVaadin Code Review <review@vaadin.com>2013-04-25 17:52:17 +0000
commitddf73a0fce1e943b3aacf7e0791504c841ce3800 (patch)
treeb00e6f10fc16d6e6114d2313e6f51414b3e1534e /server/tests
parentf73da53c7d8d950952fb1a0c8469bca7ca5d9386 (diff)
downloadvaadin-framework-ddf73a0fce1e943b3aacf7e0791504c841ce3800.tar.gz
vaadin-framework-ddf73a0fce1e943b3aacf7e0791504c841ce3800.zip
Pass ServletConfig to atmosphere init (#11716)
Furthermore, the exception that might get thrown from there is passed up through the call stack until it can be handled in a sensible way. Change-Id: I4a741b5ad4d9216255932c2328b49e73e92df2f4
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/src/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java6
-rw-r--r--server/tests/src/com/vaadin/server/VaadinSessionTest.java3
-rw-r--r--server/tests/src/com/vaadin/tests/server/TestStreamVariableMapping.java4
3 files changed, 9 insertions, 4 deletions
diff --git a/server/tests/src/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java b/server/tests/src/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java
index c7330001d3..2a83f5d5b2 100644
--- a/server/tests/src/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java
+++ b/server/tests/src/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java
@@ -28,9 +28,11 @@ public class TestAbstractApplicationServletStaticFilesLocation extends TestCase
// Workaround to avoid calling init and creating servlet config
Field f = VaadinServlet.class.getDeclaredField("servletService");
f.setAccessible(true);
- f.set(servlet, new VaadinServletService(servlet,
+ VaadinServletService service = new VaadinServletService(servlet,
new DefaultDeploymentConfiguration(servlet.getClass(),
- new Properties())));
+ new Properties()));
+ service.init();
+ f.set(servlet, service);
}
diff --git a/server/tests/src/com/vaadin/server/VaadinSessionTest.java b/server/tests/src/com/vaadin/server/VaadinSessionTest.java
index 3f83fde711..8f471afd46 100644
--- a/server/tests/src/com/vaadin/server/VaadinSessionTest.java
+++ b/server/tests/src/com/vaadin/server/VaadinSessionTest.java
@@ -45,7 +45,7 @@ public class VaadinSessionTest {
private UI ui;
@Before
- public void setup() {
+ public void setup() throws Exception {
mockServlet = new VaadinServlet() {
@Override
public String getServletName() {
@@ -55,6 +55,7 @@ public class VaadinSessionTest {
mockService = new VaadinServletService(mockServlet,
new MockDeploymentConfiguration());
+ mockService.init();
mockHttpSession = EasyMock.createMock(HttpSession.class);
mockWrappedSession = new WrappedHttpSession(mockHttpSession) {
diff --git a/server/tests/src/com/vaadin/tests/server/TestStreamVariableMapping.java b/server/tests/src/com/vaadin/tests/server/TestStreamVariableMapping.java
index 3ea114b488..bee932a29f 100644
--- a/server/tests/src/com/vaadin/tests/server/TestStreamVariableMapping.java
+++ b/server/tests/src/com/vaadin/tests/server/TestStreamVariableMapping.java
@@ -76,10 +76,12 @@ public class TestStreamVariableMapping extends TestCase {
variableName));
}
- private LegacyCommunicationManager createCommunicationManager() {
+ private LegacyCommunicationManager createCommunicationManager()
+ throws Exception {
VaadinServletService vss = new VaadinServletService(
EasyMock.createMock(VaadinServlet.class),
new MockDeploymentConfiguration());
+ vss.init();
return new LegacyCommunicationManager(
new AlwaysLockedVaadinSession(vss));
}