ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1539003 - /ace/trunk/org.apache.ace.client.repository.itest/src/org/apache/ace/it/repositoryadmin/BaseRepositoryAdminTest.java
Date Tue, 05 Nov 2013 14:11:52 GMT
Author: jawi
Date: Tue Nov  5 14:11:52 2013
New Revision: 1539003

URL: http://svn.apache.org/r1539003
Log:
Ugly hack for yet more stable itests?!

Modified:
    ace/trunk/org.apache.ace.client.repository.itest/src/org/apache/ace/it/repositoryadmin/BaseRepositoryAdminTest.java

Modified: ace/trunk/org.apache.ace.client.repository.itest/src/org/apache/ace/it/repositoryadmin/BaseRepositoryAdminTest.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository.itest/src/org/apache/ace/it/repositoryadmin/BaseRepositoryAdminTest.java?rev=1539003&r1=1539002&r2=1539003&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.client.repository.itest/src/org/apache/ace/it/repositoryadmin/BaseRepositoryAdminTest.java
(original)
+++ ace/trunk/org.apache.ace.client.repository.itest/src/org/apache/ace/it/repositoryadmin/BaseRepositoryAdminTest.java
Tue Nov  5 14:11:52 2013
@@ -19,6 +19,7 @@
 package org.apache.ace.it.repositoryadmin;
 
 import java.io.IOException;
+import java.net.ConnectException;
 import java.net.HttpURLConnection;
 import java.net.URL;
 import java.util.Arrays;
@@ -362,7 +363,23 @@ public abstract class BaseRepositoryAdmi
         try {
             assertTrue(startLatch.await(1500, TimeUnit.MILLISECONDS));
 
-            T result = callable.call();
+            T result;
+            // XXX this is dodgy, I know, but currently a workaround for some spurious failing
itests...
+            while (true) {
+                try {
+                    result = callable.call();
+                    break;
+                }
+                catch (Exception exception) {
+                    if (exception instanceof ConnectException) {
+                        // Restart it...
+                    }
+                    else {
+                        // Rethrow it...
+                        throw exception;
+                    }
+                }
+            }
 
             boolean r = topicLatch.await(15000, TimeUnit.MILLISECONDS);
             if (!r && debug) {



Mime
View raw message