This is the mail archive of the mauve-patches@sourceware.org mailing list for the Mauve project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Harness fixlet


Small fix for yesterday's ErrorStreamPrinter commit.  If a test times
out the ESP needs to be restarted.

2006-07-05  Anthony Balkissoon  <abalkiss@redhat.com>

	* Harness.java:
	(ErrorStreamPrinter.run): If the readLine() returns null restart the 
	error stream printer.

--Tony
Index: Harness.java
===================================================================
RCS file: /cvs/mauve/mauve/Harness.java,v
retrieving revision 1.18
diff -u -r1.18 Harness.java
--- Harness.java	4 Jul 2006 20:06:54 -0000	1.18
+++ Harness.java	5 Jul 2006 17:44:10 -0000
@@ -1118,7 +1118,17 @@
       try
       {
         while (true)
-          System.err.println(in.readLine());
+          {
+            String temp = in.readLine();
+            if (temp == null)
+              {
+                // This means the RunnerProcess was restarted (because of a 
+                // timeout) and we need to restart the error stream writer.
+                restartESP = true;
+                break;
+              }
+            System.err.println(temp);
+          }
       }
       catch (IOException ioe)
       {

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]