From 780d076d81a35d640fbaedd134635e8216040d28 Mon Sep 17 00:00:00 2001 From: Johannes Dahlström Date: Thu, 18 Oct 2012 11:51:00 +0300 Subject: Properly read heartbeat interval servlet parameter (#9987) * Test that servlet parameters in general are read correctly Change-Id: I4a015070e5ce03cff0fee10e037b4df2c3df8219 --- .../application/DeploymentConfigurationTest.html | 47 ++++++++++++++++++++++ .../application/DeploymentConfigurationTest.java | 20 +++++++++ 2 files changed, 67 insertions(+) create mode 100644 uitest/src/com/vaadin/tests/application/DeploymentConfigurationTest.html create mode 100644 uitest/src/com/vaadin/tests/application/DeploymentConfigurationTest.java (limited to 'uitest/src') diff --git a/uitest/src/com/vaadin/tests/application/DeploymentConfigurationTest.html b/uitest/src/com/vaadin/tests/application/DeploymentConfigurationTest.html new file mode 100644 index 0000000000..f5ad0987aa --- /dev/null +++ b/uitest/src/com/vaadin/tests/application/DeploymentConfigurationTest.html @@ -0,0 +1,47 @@ + + + + + + +DeploymentConfigurationTest + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DeploymentConfigurationTest
open/run/com.vaadin.tests.application.DeploymentConfigurationTest?restartApplication
assertTextPresentexact:closeIdleUIs: true
assertTextPresentexact:productionMode: false
assertTextPresentexact:testParam: 42
assertTextPresentexact:heartbeatInterval: 301
assertTextPresentexact:resourceCacheTime: 3601
+ + diff --git a/uitest/src/com/vaadin/tests/application/DeploymentConfigurationTest.java b/uitest/src/com/vaadin/tests/application/DeploymentConfigurationTest.java new file mode 100644 index 0000000000..9c89254bd7 --- /dev/null +++ b/uitest/src/com/vaadin/tests/application/DeploymentConfigurationTest.java @@ -0,0 +1,20 @@ +package com.vaadin.tests.application; + +import java.util.Properties; + +import com.vaadin.server.VaadinRequest; +import com.vaadin.ui.Label; +import com.vaadin.ui.UI; + +public class DeploymentConfigurationTest extends UI { + + @Override + protected void init(VaadinRequest request) { + Properties params = getSession().getConfiguration().getInitParameters(); + + for (Object key : params.keySet()) { + addComponent(new Label(key + ": " + + params.getProperty((String) key))); + } + } +} -- cgit v1.2.3