JAL-3563 adds Jalview.setSynchronous() testing
authorBobHanson <hansonr@stolaf.edu>
Sun, 22 Mar 2020 12:59:01 +0000 (07:59 -0500)
committerBobHanson <hansonr@stolaf.edu>
Sun, 22 Mar 2020 12:59:01 +0000 (07:59 -0500)
test/jalview/bin/CommandLineOperations.java

index 0d7ef6b..4ffc022 100644 (file)
@@ -203,11 +203,21 @@ public class CommandLineOperations
     {
       System.out.println(ln);
       successfulCMDs.add(ln);
+      if (ln.equals(Jalview.TERMINATOR_LINE))
+      {
+        break;
+      }
     }
-    while ((ln = worker.getErrorReader().readLine()) != null)
+    if (worker != null && worker.exit == null)
     {
-      System.err.println(ln);
+      worker.interrupt();
+      Thread.currentThread().interrupt();
+      worker.process.destroy();
     }
+    // while ((ln = worker.getErrorReader().readLine()) != null)
+    // {
+    // System.err.println(ln);
+    // }
 
   }
 
@@ -228,6 +238,7 @@ public class CommandLineOperations
       {
         break;
       }
+
       if (++count > 5)
       {
         break;