]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix duplicate id issue in test and test more corner cases
authorArtur Signell <artur@vaadin.com>
Thu, 31 Oct 2013 17:22:44 +0000 (19:22 +0200)
committerVaadin Code Review <review@vaadin.com>
Thu, 31 Oct 2013 18:41:15 +0000 (18:41 +0000)
Change-Id: I4bacfe7353968df7b0f1a8786ae4e488dffa3565

uitest/src/com/vaadin/tests/push/BasicPush.java
uitest/src/com/vaadin/tests/push/PushReconnectTest.java

index f9e29492ddf2bcc2623d059cc9a41fff1e3f6564..8e8f418c5f2218273fbb1c138443d550fe63f4cd 100644 (file)
@@ -38,7 +38,7 @@ public class BasicPush extends AbstractTestUI {
 
     public static final String SERVER_COUNTER_ID = "serverCounter";
 
-    public static final String INCREMENT_BUTTON_ID = "clientCounter";
+    public static final String INCREMENT_BUTTON_ID = "incrementCounter";
 
     private ObjectProperty<Integer> counter = new ObjectProperty<Integer>(0);
 
index 951e1eb576ce29ef40721f05d5dd132ba7316473..8f131a505133e9b1db6f7a91f1a801b5ff9f8f1e 100644 (file)
@@ -53,6 +53,15 @@ public abstract class PushReconnectTest extends MultiBrowserTestWithProxy {
         waitUntilServerCounterChanges();
         // The change should have appeared when reconnected
         Assert.assertEquals(1, getClientCounter());
+
+        // IE has problems with another reconnect
+        disconnectProxy();
+        getIncrementClientCounterButton().click();
+        Assert.assertEquals(1, getClientCounter());
+        Thread.sleep(1000);
+        connectProxy();
+        waitUntilServerCounterChanges();
+        Assert.assertEquals(2, getClientCounter());
     }
 
     @Test
@@ -67,6 +76,18 @@ public abstract class PushReconnectTest extends MultiBrowserTestWithProxy {
         waitUntilServerCounterChanges();
     }
 
+    @Test
+    public void testReallyLongDisconnect() throws Exception {
+        setDebug(true);
+        openTestURL();
+        startTimer();
+        waitUntilServerCounterChanges();
+        disconnectProxy();
+        Thread.sleep(120000);
+        connectProxy();
+        waitUntilServerCounterChanges();
+    }
+
     @Test
     public void testMultipleDisconnects() throws Exception {
         setDebug(true);