From 1697a74ffb36e99a4e8659ade06d5b5553ab849e Mon Sep 17 00:00:00 2001 From: Anna Koskinen Date: Fri, 7 Dec 2012 14:14:31 +0200 Subject: Moved StreamVariable handling from AbstractCommunicationManager to ConnectorTracker to prevent untimely unregistrations through other UIs within the same session (#10112) Change-Id: Id04c97970325be65b0b3c63756a2f2e731dd60d2 --- .../com/vaadin/tests/server/TestStreamVariableMapping.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'server/tests') 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() { -- cgit v1.2.3