db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrn...@apache.org
Subject svn commit: r1138201 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/SpawnedProcess.java
Date Tue, 21 Jun 2011 21:39:54 GMT
Author: myrnavl
Date: Tue Jun 21 21:39:54 2011
New Revision: 1138201

URL: http://svn.apache.org/viewvc?rev=1138201&view=rev
Log:
DERBY-5288; running multiple suites.All concurrently should be possible
  Modifying SpawnedProcess.java to not run the streamReader with MIN priority,
  and to do a join before returning the output.

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

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/SpawnedProcess.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/SpawnedProcess.java?rev=1138201&r1=1138200&r2=1138201&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/SpawnedProcess.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/SpawnedProcess.java Tue
Jun 21 21:39:54 2011
@@ -41,7 +41,8 @@ public final class SpawnedProcess {
 
     private final ByteArrayOutputStream out;
 
-    public SpawnedProcess(Process javaProcess, String name) {
+    public SpawnedProcess(Process javaProcess, String name) 
+                    throws InterruptedException {
         this.javaProcess = javaProcess;
         this.name = name;
 
@@ -192,7 +193,7 @@ public final class SpawnedProcess {
     }
 
     private ByteArrayOutputStream streamSaver(final InputStream in,
-            final String name) {
+            final String name) throws InterruptedException {
 
         final ByteArrayOutputStream out = new ByteArrayOutputStream() {
             public void reset() {
@@ -221,8 +222,8 @@ public final class SpawnedProcess {
 
         }, name);
         streamReader.setDaemon(true);
-        streamReader.setPriority(Thread.MIN_PRIORITY);
         streamReader.start();
+        streamReader.join(500);
 
         return out;
 



Mime
View raw message