From ca18fcb74087b26c27e322541545074fe753a90c Mon Sep 17 00:00:00 2001 From: Teemu Suo-Anttila Date: Tue, 4 Mar 2014 13:15:49 +0200 Subject: [PATCH] Fix broken PushConfigurationTest Change-Id: I27662caaaf9de457944a76190949406167a722bf --- .../com/vaadin/tests/push/PushConfigurationTest.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/uitest/src/com/vaadin/tests/push/PushConfigurationTest.java b/uitest/src/com/vaadin/tests/push/PushConfigurationTest.java index a0adc22e28..d7ffb47bbc 100644 --- a/uitest/src/com/vaadin/tests/push/PushConfigurationTest.java +++ b/uitest/src/com/vaadin/tests/push/PushConfigurationTest.java @@ -94,12 +94,10 @@ public class PushConfigurationTest extends WebsocketTest { } @Test - public void testLongPolling() { + public void testLongPolling() throws InterruptedException { setDebug(true); openTestURL(); - int counter = getServerCounter(); - assertGreaterOrEqual("Counter should be >= 1. Was: " + counter, - counter, 1); + verifyPushDisabled(); new Select(getTransportSelect()).selectByVisibleText("LONG_POLLING"); new Select(getPushModeSelect()).selectByVisibleText("AUTOMATIC"); Assert.assertTrue(vaadinElement( @@ -107,7 +105,7 @@ public class PushConfigurationTest extends WebsocketTest { .getText() .matches( "^[\\s\\S]*fallbackTransport: streaming[\\s\\S]*transport: long-polling[\\s\\S]*$")); - counter = getServerCounter(); + int counter = getServerCounter(); final int waitCounter = counter + 2; waitUntil(new ExpectedCondition() { @@ -119,7 +117,7 @@ public class PushConfigurationTest extends WebsocketTest { // Use debug console to verify we used the correct transport type Assert.assertTrue(driver.getPageSource().contains( - "Push connection established using longpolling")); + "Push connection established using long-polling")); Assert.assertFalse(driver.getPageSource().contains( "Push connection established using streaming")); -- 2.39.5