aboutsummaryrefslogtreecommitdiffstats
path: root/server/tests
diff options
context:
space:
mode:
authorAnna Koskinen <anna@vaadin.com>2012-12-07 14:14:31 +0200
committerAnna Koskinen <anna@vaadin.com>2012-12-07 14:14:31 +0200
commit1697a74ffb36e99a4e8659ade06d5b5553ab849e (patch)
treee46d235e93d085111257262dc3a77dbf61fd2aa1 /server/tests
parent2007f0d76511dd10125fe1de835437e6e40d126a (diff)
downloadvaadin-framework-1697a74ffb36e99a4e8659ade06d5b5553ab849e.tar.gz
vaadin-framework-1697a74ffb36e99a4e8659ade06d5b5553ab849e.zip
Moved StreamVariable handling from AbstractCommunicationManager to
ConnectorTracker to prevent untimely unregistrations through other UIs within the same session (#10112) Change-Id: Id04c97970325be65b0b3c63756a2f2e731dd60d2
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/src/com/vaadin/tests/server/TestStreamVariableMapping.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/server/tests/src/com/vaadin/tests/server/TestStreamVariableMapping.java b/server/tests/src/com/vaadin/tests/server/TestStreamVariableMapping.java
index f8dceca363..f24638e6a7 100644
--- a/server/tests/src/com/vaadin/tests/server/TestStreamVariableMapping.java
+++ b/server/tests/src/com/vaadin/tests/server/TestStreamVariableMapping.java
@@ -8,6 +8,7 @@ import com.vaadin.server.CommunicationManager;
import com.vaadin.server.StreamVariable;
import com.vaadin.server.VaadinRequest;
import com.vaadin.server.VaadinSession;
+import com.vaadin.ui.ConnectorTracker;
import com.vaadin.ui.UI;
import com.vaadin.ui.Upload;
@@ -51,18 +52,21 @@ public class TestStreamVariableMapping extends TestCase {
streamVariable);
assertTrue(targetUrl.startsWith("app://APP/UPLOAD/-1/1/myName/"));
- StreamVariable streamVariable2 = cm.getStreamVariable(
+ ConnectorTracker tracker = UI.getCurrent().getConnectorTracker();
+ StreamVariable streamVariable2 = tracker.getStreamVariable(
owner.getConnectorId(), variableName);
assertSame(streamVariable, streamVariable2);
}
public void testRemoverVariable() {
+ ConnectorTracker tracker = UI.getCurrent().getConnectorTracker();
cm.getStreamVariableTargetUrl(owner, variableName, streamVariable);
- assertNotNull(cm
- .getStreamVariable(owner.getConnectorId(), variableName));
+ assertNotNull(tracker.getStreamVariable(owner.getConnectorId(),
+ variableName));
cm.cleanStreamVariable(owner, variableName);
- assertNull(cm.getStreamVariable(owner.getConnectorId(), variableName));
+ assertNull(tracker.getStreamVariable(owner.getConnectorId(),
+ variableName));
}
private CommunicationManager createCommunicationManager() {