You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by ma...@apache.org on 2017/06/10 11:26:31 UTC

[46/50] archiva git commit: Additional fix for chrome WebDriver

Additional fix for chrome WebDriver


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/aab52dc4
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/aab52dc4
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/aab52dc4

Branch: refs/heads/citest
Commit: aab52dc461840f4de98081a76016ec700bc49223
Parents: 2513029
Author: Martin Stockhammer <ma...@apache.org>
Authored: Fri Jun 9 23:39:38 2017 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Fri Jun 9 23:39:38 2017 +0200

----------------------------------------------------------------------
 .../web/test/parent/AbstractSeleniumTest.java   | 28 ++++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/aab52dc4/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
----------------------------------------------------------------------
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 7922997..40d3f98 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);