db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r916897 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun.java
Date Sat, 27 Feb 2010 02:47:33 GMT
Author: kmarsden
Date: Sat Feb 27 02:47:33 2010
New Revision: 916897

URL: http://svn.apache.org/viewvc?rev=916897&view=rev
Log:
DERBY-4564 Replication tests do not pick up derby.tests.networkServerStartTimeout setting

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun.java?rev=916897&r1=916896&r2=916897&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun.java
Sat Feb 27 02:47:33 2010
@@ -135,6 +135,8 @@
     static String LF = null;
     
     static final String remoteShell = "/usr/bin/ssh -x"; // or /usr/bin/ssh ?
+
+    private static final long DEFAULT_SERVER_START_TIMEOUT = 75000;
     
     Utils util = new Utils();
     
@@ -2279,9 +2281,14 @@
                 }
             }
             );
+            // DERBY-4564. Make replication tests use derby.tests.networkServerTimeout proeprty
+            String userStartTimeout = getSystemProperty("derby.tests.networkServerStartTimeout");
+            long startTimeout = (userStartTimeout != null )? 
+            		Long.parseLong(userStartTimeout): DEFAULT_SERVER_START_TIMEOUT;
+            long iterations = startTimeout / PINGSERVER_SLEEP_TIME_MILLIS;		
             util.DEBUG(debugId+"************** Do .start().");
             serverThread.start();
-            pingServer(serverHost, serverPort, 150); // Wait for the server to come up in
a reasonable time....
+            pingServer(serverHost, serverPort, (int) iterations); // Wait for the server
to come up in a reasonable time....
 
         }
         
@@ -2636,8 +2643,7 @@
                 + iterations + " * " + PINGSERVER_SLEEP_TIME_MILLIS + "ms.: "
                 + finalException.getMessage();
         util.DEBUG( msg );
-        finalException.printStackTrace(); // REMOVE?
-        throw new Exception(msg);
+        throw finalException;
         
     }
 



Mime
View raw message