]> source.dussan.org Git - vaadin-framework.git/commitdiff
Disable fallback in a way compatible with Atmosphere JS 2.0.3 (#12241)
authorArtur Signell <artur@vaadin.com>
Wed, 16 Oct 2013 11:09:45 +0000 (14:09 +0300)
committerArtur Signell <artur@vaadin.com>
Wed, 16 Oct 2013 11:10:49 +0000 (14:10 +0300)
Change-Id: I4023b50038288e39559cb8542ed59be807274d40

uitest/src/com/vaadin/tests/integration/ServletIntegrationWebsocketUI.java
uitest/src/com/vaadin/tests/push/BasicPushWebsocket.java

index 905b80fd85701114979329bf11b21a9a483ec998..d7c525f202427b659843c2d26975410c6bbf8e25 100644 (file)
@@ -18,6 +18,7 @@ package com.vaadin.tests.integration;
 import com.vaadin.annotations.Push;
 import com.vaadin.server.VaadinRequest;
 import com.vaadin.shared.ui.ui.Transport;
+import com.vaadin.shared.ui.ui.UIState.PushConfigurationState;
 
 /**
  * Server test which uses websockets
@@ -39,7 +40,9 @@ public class ServletIntegrationWebsocketUI extends ServletIntegrationUI {
     protected void init(VaadinRequest request) {
         super.init(request);
         // Ensure no fallback is used
-        getPushConfiguration().setFallbackTransport(Transport.WEBSOCKET);
+        getPushConfiguration().setParameter(
+                PushConfigurationState.FALLBACK_TRANSPORT_PARAM, "none");
+
     }
 
 }
index 96793a90f8b33f87e5889ca18e764a384ee128cb..465caf0165703bb6af36d242adcbda95ef72a6ed 100644 (file)
@@ -18,6 +18,7 @@ package com.vaadin.tests.push;
 import com.vaadin.annotations.Push;
 import com.vaadin.server.VaadinRequest;
 import com.vaadin.shared.ui.ui.Transport;
+import com.vaadin.shared.ui.ui.UIState.PushConfigurationState;
 
 @Push(transport = Transport.WEBSOCKET)
 public class BasicPushWebsocket extends BasicPush {
@@ -26,7 +27,8 @@ public class BasicPushWebsocket extends BasicPush {
     public void init(VaadinRequest request) {
         super.init(request);
         // Don't use fallback so we can easier detect if websocket fails
-        getPushConfiguration().setFallbackTransport(Transport.WEBSOCKET);
+        getPushConfiguration().setParameter(
+                PushConfigurationState.FALLBACK_TRANSPORT_PARAM, "none");
     }
 
 }