aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2017-06-09 23:39:38 +0200
committerMartin Stockhammer <martin_s@apache.org>2017-06-09 23:39:38 +0200
commitaab52dc461840f4de98081a76016ec700bc49223 (patch)
tree5dbec117ec9e4c41ed615dd2c3529f814a0f31eb
parent2513029e2e6c3333073c265fa496bc50fb2e405d (diff)
downloadarchiva-aab52dc461840f4de98081a76016ec700bc49223.tar.gz
archiva-aab52dc461840f4de98081a76016ec700bc49223.zip
Additional fix for chrome WebDriver
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java28
1 files changed, 26 insertions, 2 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
index 7922997e5..40d3f9852 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
@@ -639,6 +639,14 @@ public abstract class AbstractSeleniumTest
ex = e;
count--;
}
+ try
+ {
+ Thread.currentThread().sleep(500);
+ }
+ catch ( InterruptedException e )
+ {
+ // Ignore
+ }
}
if (ex!=null) {
Assert.fail( message);
@@ -671,16 +679,32 @@ public abstract class AbstractSeleniumTest
Exception ex = null;
while(count>0)
{
+ if (count<attempts) {
+ try
+ {
+ result = conditions.apply( getWebDriver() );
+ return result;
+ } catch (Exception e) {
+ // Ignore
+ }
+ }
el.click();
try
{
result = wait.until( conditions );
- count=0;
- ex = null;
+ return result;
} catch (Exception e) {
ex = e;
count--;
}
+ try
+ {
+ Thread.currentThread().sleep(500);
+ }
+ catch ( InterruptedException e )
+ {
+ // Ignore
+ }
}
if (ex!=null) {
Assert.fail( message);