db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1299573 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun.java
Date Mon, 12 Mar 2012 07:54:36 GMT
Author: kahatlen
Date: Mon Mar 12 07:54:36 2012
New Revision: 1299573

URL: http://svn.apache.org/viewvc?rev=1299573&view=rev
Log:
DERBY-5643: Occasional hangs in replication tests on Linux

Make sure the forked processes have terminated completely before
starting the next test case.

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=1299573&r1=1299572&r2=1299573&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
Mon Mar 12 07:54:36 2012
@@ -1598,8 +1598,10 @@ public class ReplicationRun extends Base
                     try
                     {
                         util.DEBUG(ID+"************** In run().");
-                        Runtime.getRuntime().exec(fullCmd,envElements,workingDir);
+                        Process proc = Runtime.getRuntime().exec(
+                                fullCmd, envElements, workingDir);
                         util.DEBUG(ID+"************** Done exec().");
+                        processDEBUGOutput(ID, proc);
                     }
                     catch (Exception ex)
                     {
@@ -1611,8 +1613,7 @@ public class ReplicationRun extends Base
             );
             util.DEBUG(ID+"************** Do .start().");
             cmdThread.start();
-            cmdThread.join();
-            util.DEBUG(ID+"************** Done .join().");
+            registerThread(cmdThread);
         }
      
         util.DEBUG(ID+"--- ");
@@ -1709,8 +1710,6 @@ public class ReplicationRun extends Base
             util.DEBUG(ID+"************** Do .start(). ");
             serverThread.start();
             registerThread(serverThread);
-            // serverThread.join();
-            // DEBUG(ID+"************** Done .join().");
             
         }
         
@@ -2414,7 +2413,9 @@ public class ReplicationRun extends Base
             util.DEBUG(id+line);
         }
         util.DEBUG(id+"----     ");
-        
+
+        int exitCode = proc.waitFor();
+        util.DEBUG(id + "process exit status: " + exitCode);
     }
 
     /**



Mime
View raw message