Skip to content

Commit

Permalink
Additional fixes related to ParameterizedTB3Runner and Nginx + Wildfl…
Browse files Browse the repository at this point in the history
…y 9 test changes

Change-Id: Ib6740b10fe773c2d54973ea45a1aca0d29afeb49
  • Loading branch information
Artur- committed Sep 4, 2015
1 parent 3b4bd95 commit f03e488
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 16 deletions.
Expand Up @@ -67,31 +67,29 @@ public void nonbufferingTimeoutActionAfterFirstTimeout() throws Exception {
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));
BasicPushTest.getServerCounterStartButton(this).click();
waitUntil(new ExpectedCondition<Boolean>() {
@Override
public Boolean apply(WebDriver input) {
return BasicPushTest
.getServerCounter(LongPollingProxyServerTest.this) > 0;
}
});
waitUntil(new ExpectedCondition<Boolean>() {
@Override
public Boolean apply(WebDriver input) {
Expand Down
Expand Up @@ -99,13 +99,14 @@ protected List<FrameworkMethod> computeTestMethods() {
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);
}
}

Expand Down
11 changes: 11 additions & 0 deletions uitest/src/com/vaadin/tests/tb3/IncludeIfProperty.java
Expand Up @@ -21,6 +21,17 @@
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
Expand Down
2 changes: 1 addition & 1 deletion uitest/src/com/vaadin/tests/tb3/ScreenshotTB3Test.java
Expand Up @@ -439,7 +439,7 @@ private String getUniqueIdentifier(Integer versionOverride) {
// 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);
Expand Down

0 comments on commit f03e488

Please sign in to comment.