harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r938210 - in /harmony/enhanced/java/trunk/classlib/modules/rmi/src/test/api/java/org/apache/harmony/rmi: ConnectionTest.java RegistryTest.java
Date Mon, 26 Apr 2010 19:53:05 GMT
Author: hindessm
Date: Mon Apr 26 19:53:04 2010
New Revision: 938210

URL: http://svn.apache.org/viewvc?rev=938210&view=rev
Log:
Quick fix for annoying failing tests on Apache hudson server.  (Could
probably be a bit smarter than this and run some of the tests but this
will do for now.)

Modified:
    harmony/enhanced/java/trunk/classlib/modules/rmi/src/test/api/java/org/apache/harmony/rmi/ConnectionTest.java
    harmony/enhanced/java/trunk/classlib/modules/rmi/src/test/api/java/org/apache/harmony/rmi/RegistryTest.java

Modified: harmony/enhanced/java/trunk/classlib/modules/rmi/src/test/api/java/org/apache/harmony/rmi/ConnectionTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/rmi/src/test/api/java/org/apache/harmony/rmi/ConnectionTest.java?rev=938210&r1=938209&r2=938210&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/rmi/src/test/api/java/org/apache/harmony/rmi/ConnectionTest.java
(original)
+++ harmony/enhanced/java/trunk/classlib/modules/rmi/src/test/api/java/org/apache/harmony/rmi/ConnectionTest.java
Mon Apr 26 19:53:04 2010
@@ -84,6 +84,11 @@ public class ConnectionTest extends RMIT
      *          If some error occurs.
      */
     public void testDirectSocket_SingleVM() throws Exception {
+        if (checkSocket("127.0.0.1", REGISTRY_PORT, TIMEOUT_TICK*3)) {
+            System.err.println("Registry DEFAULT port ("
+                               + REGISTRY_PORT + ") in use, skipping tests.");
+            return;
+        }
         System.err.println("testDirectSocket_SingleVM starting");
         testSingleVM(CONFIG_DIRECT_SOCKET, true);
     }
@@ -96,6 +101,11 @@ public class ConnectionTest extends RMIT
      *          If some error occurs.
      */
     public void testDirectHTTP_SingleVM() throws Exception {
+        if (checkSocket("127.0.0.1", REGISTRY_PORT, TIMEOUT_TICK*3)) {
+            System.err.println("Registry DEFAULT port ("
+                               + REGISTRY_PORT + ") in use, skipping tests.");
+            return;
+        }
         System.err.println("testDirectHTTP_SingleVM starting");
         testSingleVM(CONFIG_DIRECT_HTTP, true);
     }

Modified: harmony/enhanced/java/trunk/classlib/modules/rmi/src/test/api/java/org/apache/harmony/rmi/RegistryTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/rmi/src/test/api/java/org/apache/harmony/rmi/RegistryTest.java?rev=938210&r1=938209&r2=938210&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/rmi/src/test/api/java/org/apache/harmony/rmi/RegistryTest.java
(original)
+++ harmony/enhanced/java/trunk/classlib/modules/rmi/src/test/api/java/org/apache/harmony/rmi/RegistryTest.java
Mon Apr 26 19:53:04 2010
@@ -96,6 +96,13 @@ public class RegistryTest extends RMITes
 
             // Create registry.
             int port = REGISTRY_PORT;
+
+            if (checkSocket("127.0.0.1", port, TIMEOUT_TICK*3)) {
+                System.err.println("Registry DEFAULT port ("
+                                   + port + ") in use, skipping tests.");
+                return;
+            }
+
             Registry reg = LocateRegistry.createRegistry(port);
             System.out.println("Registry on DEFAULT port ("
                                + port + ") created.");



Mime
View raw message