From 1cc4dc18fab893ab584d4ac3bf8219933369a915 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Thu, 31 Oct 2013 19:22:44 +0200 Subject: [PATCH] Fix duplicate id issue in test and test more corner cases Change-Id: I4bacfe7353968df7b0f1a8786ae4e488dffa3565 --- .../src/com/vaadin/tests/push/BasicPush.java | 2 +- .../vaadin/tests/push/PushReconnectTest.java | 21 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/uitest/src/com/vaadin/tests/push/BasicPush.java b/uitest/src/com/vaadin/tests/push/BasicPush.java index f9e29492dd..8e8f418c5f 100644 --- a/uitest/src/com/vaadin/tests/push/BasicPush.java +++ b/uitest/src/com/vaadin/tests/push/BasicPush.java @@ -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 counter = new ObjectProperty(0); diff --git a/uitest/src/com/vaadin/tests/push/PushReconnectTest.java b/uitest/src/com/vaadin/tests/push/PushReconnectTest.java index 951e1eb576..8f131a5051 100644 --- a/uitest/src/com/vaadin/tests/push/PushReconnectTest.java +++ b/uitest/src/com/vaadin/tests/push/PushReconnectTest.java @@ -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); -- 2.39.5