db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject svn commit: r535572 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/NetworkServerTestSetup.java
Date Sat, 05 May 2007 23:23:32 GMT
Author: mikem
Date: Sat May  5 16:23:31 2007
New Revision: 535572

URL: http://svn.apache.org/viewvc?view=rev&rev=535572
Log:
DERBY-2616

Increase the maximum wait time for tests that start the server.  On my 
windows XP system I would get intermittent failures at the old 60 second
max.  I believe the issue is turnaround time on the port, rather than a
specific startup issue in the code.  Setting the max to 300 seconds allowed
me to pass a complete nightly test and also passed a reiterated test 30 times
that would previously fail every time at the 60 second level.


Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/NetworkServerTestSetup.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/NetworkServerTestSetup.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/NetworkServerTestSetup.java?view=diff&rev=535572&r1=535571&r2=535572
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/NetworkServerTestSetup.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/NetworkServerTestSetup.java
Sat May  5 16:23:31 2007
@@ -43,11 +43,19 @@
  */
 final public class NetworkServerTestSetup extends TestSetup {
 
-    /** Wait maximum 1 minute for server to start */
-    private static final long WAIT_TIME = 60000;
+    /** Setting maximum wait time to 300 seconds.   For some systems it looks
+     *  like restarting a server to listen on the same port is blocked waiting
+     *  for a system specific interval.  This number looks to be something
+     *  like 240 seconds on XP.  Waiting shorter than this time causes
+     *  intermittent failures on a laptop running XP with a software firewall
+     *  and a VPN.  Increasing the wait time should not adversely affect those
+     *  systems with fast port turnaround as the actual code loops for 
+     *  SLEEP_TIME intervals, so should never see WAIT_TIME.
+     */
+    private static final long WAIT_TIME = 300000;
     
-    /** Sleep for 50 ms before pinging the network server (again) */
-    private static final int SLEEP_TIME = 50;
+    /** Sleep for 500 ms before pinging the network server (again) */
+    private static final int SLEEP_TIME = 500;
 
     private static  long    waitTime = WAIT_TIME;
     



Mime
View raw message