]> source.dussan.org Git - vaadin-framework.git/commitdiff
Rename to follow same scheme as other push tests
authorArtur Signell <artur@vaadin.com>
Fri, 21 Feb 2014 23:19:12 +0000 (01:19 +0200)
committerJohannes Dahlström <johannesd@vaadin.com>
Fri, 21 Feb 2014 23:48:19 +0000 (23:48 +0000)
Change-Id: I6ea0626ffb88182120f69e0ca988250248e365e1

uitest/src/com/vaadin/tests/push/LongPollingReconnectTest.java [deleted file]
uitest/src/com/vaadin/tests/push/PushReconnectTest.java [deleted file]
uitest/src/com/vaadin/tests/push/ReconnectLongPollingTest.java [new file with mode: 0644]
uitest/src/com/vaadin/tests/push/ReconnectStreamingTest.java [new file with mode: 0755]
uitest/src/com/vaadin/tests/push/ReconnectTest.java [new file with mode: 0644]
uitest/src/com/vaadin/tests/push/ReconnectWebsocketTest.java [new file with mode: 0644]
uitest/src/com/vaadin/tests/push/StreamingReconnectTest.java [deleted file]
uitest/src/com/vaadin/tests/push/WebsocketReconnectTest.java [deleted file]

diff --git a/uitest/src/com/vaadin/tests/push/LongPollingReconnectTest.java b/uitest/src/com/vaadin/tests/push/LongPollingReconnectTest.java
deleted file mode 100644 (file)
index 81c974e..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright 2000-2013 Vaadin Ltd.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.tests.push;
-
-public class LongPollingReconnectTest extends PushReconnectTest {
-
-    @Override
-    protected Class<?> getUIClass() {
-        return BasicPushLongPolling.class;
-    }
-
-}
diff --git a/uitest/src/com/vaadin/tests/push/PushReconnectTest.java b/uitest/src/com/vaadin/tests/push/PushReconnectTest.java
deleted file mode 100644 (file)
index 76a0b54..0000000
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Copyright 2000-2013 Vaadin Ltd.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.tests.push;
-
-import org.junit.Assert;
-import org.junit.Test;
-import org.openqa.selenium.WebDriver;
-import org.openqa.selenium.WebElement;
-import org.openqa.selenium.support.ui.ExpectedCondition;
-
-import com.vaadin.tests.tb3.MultiBrowserTestWithProxy;
-
-public abstract class PushReconnectTest extends MultiBrowserTestWithProxy {
-
-    @Test
-    public void testShortDisconnect() throws Exception {
-        setDebug(true);
-        openTestURL();
-        startTimer();
-        waitUntilServerCounterChanges();
-        disconnectProxy();
-        Thread.sleep(1000);
-        connectProxy();
-        waitUntilServerCounterChanges();
-    }
-
-    @Test
-    public void testUserActionWhileDisconnectedWithDelay() throws Exception {
-        setDebug(true);
-        openTestURL();
-        startTimer();
-        waitUntilServerCounterChanges();
-        disconnectProxy();
-        Assert.assertEquals(0, getClientCounter());
-        getIncrementClientCounterButton().click();
-        // No change while disconnected
-        Assert.assertEquals(0, getClientCounter());
-        // Firefox sends extra onopen calls after a while, which breaks
-        // everything
-        Thread.sleep(10000);
-        connectProxy();
-        waitUntilServerCounterChanges();
-        // The change should have appeared when reconnected
-        Assert.assertEquals(1, getClientCounter());
-    }
-
-    @Test
-    public void testUserActionWhileDisconnected() throws Exception {
-        setDebug(true);
-        openTestURL();
-        startTimer();
-        waitUntilServerCounterChanges();
-        disconnectProxy();
-        Assert.assertEquals(0, getClientCounter());
-        getIncrementClientCounterButton().click();
-        // No change while disconnected
-        Assert.assertEquals(0, getClientCounter());
-        Thread.sleep(1000);
-        connectProxy();
-        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
-    public void testLongDisconnect() throws Exception {
-        setDebug(true);
-        openTestURL();
-        startTimer();
-        waitUntilServerCounterChanges();
-        disconnectProxy();
-        Thread.sleep(12000);
-        connectProxy();
-        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);
-        openTestURL();
-        startTimer();
-        waitUntilServerCounterChanges();
-        for (int i = 0; i < 5; i++) {
-            disconnectProxy();
-            Thread.sleep(1000);
-            connectProxy();
-            waitUntilServerCounterChanges();
-        }
-    }
-
-    @Test
-    public void testMultipleQuickReconnects() throws Exception {
-        setDebug(true);
-        openTestURL();
-        startTimer();
-        waitUntilServerCounterChanges();
-        for (int i = 0; i < 50; i++) {
-            disconnectProxy();
-            Thread.sleep(100);
-            connectProxy();
-            Thread.sleep(100);
-        }
-        waitUntilServerCounterChanges();
-        waitUntilServerCounterChanges();
-    }
-
-    private int getClientCounter() {
-        return BasicPushTest.getClientCounter(this);
-    }
-
-    private WebElement getIncrementClientCounterButton() {
-        return BasicPushTest.getIncrementButton(this);
-    }
-
-    private void waitUntilServerCounterChanges() {
-        final int counter = BasicPushTest.getServerCounter(this);
-        waitUntil(new ExpectedCondition<Boolean>() {
-
-            @Override
-            public Boolean apply(WebDriver input) {
-                return BasicPushTest.getServerCounter(PushReconnectTest.this) > counter;
-            }
-        }, 30);
-    }
-
-    private void startTimer() {
-        BasicPushTest.getServerCounterStartButton(this).click();
-    }
-
-}
diff --git a/uitest/src/com/vaadin/tests/push/ReconnectLongPollingTest.java b/uitest/src/com/vaadin/tests/push/ReconnectLongPollingTest.java
new file mode 100644 (file)
index 0000000..6d0c0c5
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2000-2013 Vaadin Ltd.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.push;
+
+public class ReconnectLongPollingTest extends ReconnectTest {
+
+    @Override
+    protected Class<?> getUIClass() {
+        return BasicPushLongPolling.class;
+    }
+
+}
diff --git a/uitest/src/com/vaadin/tests/push/ReconnectStreamingTest.java b/uitest/src/com/vaadin/tests/push/ReconnectStreamingTest.java
new file mode 100755 (executable)
index 0000000..ebacf5b
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2000-2013 Vaadin Ltd.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.push;
+
+public class ReconnectStreamingTest extends ReconnectTest {
+
+    @Override
+    protected Class<?> getUIClass() {
+        return BasicPushStreaming.class;
+    }
+
+}
diff --git a/uitest/src/com/vaadin/tests/push/ReconnectTest.java b/uitest/src/com/vaadin/tests/push/ReconnectTest.java
new file mode 100644 (file)
index 0000000..69b2ccf
--- /dev/null
@@ -0,0 +1,164 @@
+/*
+ * Copyright 2000-2013 Vaadin Ltd.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.push;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.ui.ExpectedCondition;
+
+import com.vaadin.tests.tb3.MultiBrowserTestWithProxy;
+
+public abstract class ReconnectTest extends MultiBrowserTestWithProxy {
+
+    @Test
+    public void testShortDisconnect() throws Exception {
+        setDebug(true);
+        openTestURL();
+        startTimer();
+        waitUntilServerCounterChanges();
+        disconnectProxy();
+        Thread.sleep(1000);
+        connectProxy();
+        waitUntilServerCounterChanges();
+    }
+
+    @Test
+    public void testUserActionWhileDisconnectedWithDelay() throws Exception {
+        setDebug(true);
+        openTestURL();
+        startTimer();
+        waitUntilServerCounterChanges();
+        disconnectProxy();
+        Assert.assertEquals(0, getClientCounter());
+        getIncrementClientCounterButton().click();
+        // No change while disconnected
+        Assert.assertEquals(0, getClientCounter());
+        // Firefox sends extra onopen calls after a while, which breaks
+        // everything
+        Thread.sleep(10000);
+        connectProxy();
+        waitUntilServerCounterChanges();
+        // The change should have appeared when reconnected
+        Assert.assertEquals(1, getClientCounter());
+    }
+
+    @Test
+    public void testUserActionWhileDisconnected() throws Exception {
+        setDebug(true);
+        openTestURL();
+        startTimer();
+        waitUntilServerCounterChanges();
+        disconnectProxy();
+        Assert.assertEquals(0, getClientCounter());
+        getIncrementClientCounterButton().click();
+        // No change while disconnected
+        Assert.assertEquals(0, getClientCounter());
+        Thread.sleep(1000);
+        connectProxy();
+        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
+    public void testLongDisconnect() throws Exception {
+        setDebug(true);
+        openTestURL();
+        startTimer();
+        waitUntilServerCounterChanges();
+        disconnectProxy();
+        Thread.sleep(12000);
+        connectProxy();
+        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);
+        openTestURL();
+        startTimer();
+        waitUntilServerCounterChanges();
+        for (int i = 0; i < 5; i++) {
+            disconnectProxy();
+            Thread.sleep(1000);
+            connectProxy();
+            waitUntilServerCounterChanges();
+        }
+    }
+
+    @Test
+    public void testMultipleQuickReconnects() throws Exception {
+        setDebug(true);
+        openTestURL();
+        startTimer();
+        waitUntilServerCounterChanges();
+        for (int i = 0; i < 50; i++) {
+            disconnectProxy();
+            Thread.sleep(100);
+            connectProxy();
+            Thread.sleep(100);
+        }
+        waitUntilServerCounterChanges();
+        waitUntilServerCounterChanges();
+    }
+
+    private int getClientCounter() {
+        return BasicPushTest.getClientCounter(this);
+    }
+
+    private WebElement getIncrementClientCounterButton() {
+        return BasicPushTest.getIncrementButton(this);
+    }
+
+    private void waitUntilServerCounterChanges() {
+        final int counter = BasicPushTest.getServerCounter(this);
+        waitUntil(new ExpectedCondition<Boolean>() {
+
+            @Override
+            public Boolean apply(WebDriver input) {
+                return BasicPushTest.getServerCounter(ReconnectTest.this) > counter;
+            }
+        }, 30);
+    }
+
+    private void startTimer() {
+        BasicPushTest.getServerCounterStartButton(this).click();
+    }
+
+}
diff --git a/uitest/src/com/vaadin/tests/push/ReconnectWebsocketTest.java b/uitest/src/com/vaadin/tests/push/ReconnectWebsocketTest.java
new file mode 100644 (file)
index 0000000..57fe0a0
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2000-2013 Vaadin Ltd.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.push;
+
+import java.util.List;
+
+import org.openqa.selenium.remote.DesiredCapabilities;
+
+import com.vaadin.tests.tb3.WebsocketTest;
+
+public class ReconnectWebsocketTest extends ReconnectTest {
+
+    @Override
+    public List<DesiredCapabilities> getBrowsersToTest() {
+        return WebsocketTest.getWebsocketBrowsers();
+    }
+
+    @Override
+    protected Class<?> getUIClass() {
+        return BasicPushWebsocket.class;
+    }
+
+}
diff --git a/uitest/src/com/vaadin/tests/push/StreamingReconnectTest.java b/uitest/src/com/vaadin/tests/push/StreamingReconnectTest.java
deleted file mode 100755 (executable)
index 24dfdd8..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright 2000-2013 Vaadin Ltd.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.tests.push;
-
-public class StreamingReconnectTest extends PushReconnectTest {
-
-    @Override
-    protected Class<?> getUIClass() {
-        return BasicPushStreaming.class;
-    }
-
-}
diff --git a/uitest/src/com/vaadin/tests/push/WebsocketReconnectTest.java b/uitest/src/com/vaadin/tests/push/WebsocketReconnectTest.java
deleted file mode 100644 (file)
index 075a18c..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2000-2013 Vaadin Ltd.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.tests.push;
-
-import java.util.List;
-
-import org.openqa.selenium.remote.DesiredCapabilities;
-
-import com.vaadin.tests.tb3.WebsocketTest;
-
-public class WebsocketReconnectTest extends PushReconnectTest {
-
-    @Override
-    public List<DesiredCapabilities> getBrowsersToTest() {
-        return WebsocketTest.getWebsocketBrowsers();
-    }
-
-    @Override
-    protected Class<?> getUIClass() {
-        return BasicPushWebsocket.class;
-    }
-
-}