diff options
author | Artur Signell <artur@vaadin.com> | 2015-09-04 12:53:03 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2015-09-04 13:01:02 +0300 |
commit | f03e488f206c92f321e7e79bfb9c86c56077b341 (patch) | |
tree | 9480f6b48e99bd3a0e4d4d97dd63b94fb90d3778 /uitest/src | |
parent | 3b4bd95b6e9383949bf8cf61d8b0b2c08b8443aa (diff) | |
download | vaadin-framework-f03e488f206c92f321e7e79bfb9c86c56077b341.tar.gz vaadin-framework-f03e488f206c92f321e7e79bfb9c86c56077b341.zip |
Additional fixes related to ParameterizedTB3Runner and Nginx + Wildfly 9 test changes
Change-Id: Ib6740b10fe773c2d54973ea45a1aca0d29afeb49
Diffstat (limited to 'uitest/src')
4 files changed, 26 insertions, 16 deletions
diff --git a/uitest/src/com/vaadin/tests/integration/LongPollingProxyServerTest.java b/uitest/src/com/vaadin/tests/integration/LongPollingProxyServerTest.java index 58c4198ec0..16c599641b 100644 --- a/uitest/src/com/vaadin/tests/integration/LongPollingProxyServerTest.java +++ b/uitest/src/com/vaadin/tests/integration/LongPollingProxyServerTest.java @@ -67,20 +67,25 @@ public class LongPollingProxyServerTest extends AbstractIntegrationTest { actionAfterFirstTimeout("nonbuffering-timeout"); } + private String getUrl(String bufferingOrNot) { + return getBaseURL() + "/" + bufferingOrNot + "/demo" + + getDeploymentPath(); + } + private void actionAfterFirstTimeout(String bufferingOrNot) throws Exception { - String url = getBaseURL() + "/" + bufferingOrNot + "/demo" - + getDeploymentPath(); + String url = getUrl(bufferingOrNot); getDriver().get(url); - Thread.sleep(15000); // Server Timeout is 10s + // The wildfly9-nginx server has a configured timeout of 10s for + // *-timeout urls + Thread.sleep(15000); Assert.assertEquals(0, BasicPushTest.getClientCounter(this)); BasicPushTest.getIncrementButton(this).click(); Assert.assertEquals(1, BasicPushTest.getClientCounter(this)); } private void basicPush(String bufferingOrNot) throws Exception { - String url = getBaseURL() + "/" + bufferingOrNot + "/demo" - + getDeploymentPath(); + String url = getUrl(bufferingOrNot); getDriver().get(url); Assert.assertEquals(0, BasicPushTest.getServerCounter(this)); @@ -89,13 +94,6 @@ public class LongPollingProxyServerTest extends AbstractIntegrationTest { @Override public Boolean apply(WebDriver input) { return BasicPushTest - .getServerCounter(LongPollingProxyServerTest.this) > 0; - } - }); - waitUntil(new ExpectedCondition<Boolean>() { - @Override - public Boolean apply(WebDriver input) { - return BasicPushTest .getServerCounter(LongPollingProxyServerTest.this) > 1; } }); diff --git a/uitest/src/com/vaadin/tests/integration/ParameterizedTB3Runner.java b/uitest/src/com/vaadin/tests/integration/ParameterizedTB3Runner.java index 59870a59a8..b051fb51db 100644 --- a/uitest/src/com/vaadin/tests/integration/ParameterizedTB3Runner.java +++ b/uitest/src/com/vaadin/tests/integration/ParameterizedTB3Runner.java @@ -99,13 +99,14 @@ public class ParameterizedTB3Runner extends TB3Runner { try { values = (Collection<String>) m.invoke(null); if (!values.isEmpty()) { - // Ignore any empty collections to allow e.g. intergration + // Ignore any empty collections to allow e.g. integration // tests to use "/demo" path by default without adding that - // to the screnshot name + // to the screenshot name parameters.put(setterMethod, values); } } catch (Exception e) { - e.printStackTrace(); + throw new IllegalStateException("The setter " + m.getName() + + " could not be invoked", e); } } diff --git a/uitest/src/com/vaadin/tests/tb3/IncludeIfProperty.java b/uitest/src/com/vaadin/tests/tb3/IncludeIfProperty.java index cb04b4f2e8..789422c0c6 100644 --- a/uitest/src/com/vaadin/tests/tb3/IncludeIfProperty.java +++ b/uitest/src/com/vaadin/tests/tb3/IncludeIfProperty.java @@ -21,6 +21,17 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +/** + * Annotation to control inclusion of a test into a test suite. + * <p> + * The test will be included in the suite only if the given System property + * {@code property} has the given {@code value}. + * <p> + * Used by {@link TB3TestLocator} + * + * @since + * @author Vaadin Ltd + */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) @Inherited diff --git a/uitest/src/com/vaadin/tests/tb3/ScreenshotTB3Test.java b/uitest/src/com/vaadin/tests/tb3/ScreenshotTB3Test.java index 78266e9a9d..1c24720075 100644 --- a/uitest/src/com/vaadin/tests/tb3/ScreenshotTB3Test.java +++ b/uitest/src/com/vaadin/tests/tb3/ScreenshotTB3Test.java @@ -439,7 +439,7 @@ public abstract class ScreenshotTB3Test extends AbstractTB3Test { // Windows_Firefox_24_bufferingdemo_valo if (versionOverride != null) { - // Windows_Firefox_17_-buffering-demo_valo + // Windows_Firefox_17_bufferingdemo_valo parameters = parameters.replaceFirst("_" + getDesiredCapabilities().getVersion(), "_" + versionOverride); |