This removes the busy waiting from the Harness and replaces it with blocking read() calls using Sockets with specified timeouts. This is RFC because I'd like it to be tested to see if it speeds things up as much as Mark's workaround before it is checked in. --Tony 2006-06-26 Anthony Balkissoon * Harness.java: (bcp_timeout): Removed this field. (server): New field. (client): New field. (runner_watcher): Removed this field. (testIsHung): Removed this field. (runner_lock): Removed this field. (getBootClassPath): Removed the TimeoutWatcher here, just assume this tiny program doesn't hang. Also remove the workaround for busy-waiting. (finalize): Close the server socket. (initProcess): Setup the server socket and client socket. Set the runner_in and runner_out streams to be from the getInputStream() and getOutputStream() methods for the client socket rather than from the forked process. Removed the references to runner_watcher. (runTest): Redesigned to use a blocking readLine() with a specified timeout, rather than polling for input with a separate TimeoutWatcher. (TimeoutWatcher): Removed this class. * RunnerProcess.java: Replaced all references to System.out with the new PrintWriter "out". Also: (FAILED_TO_LOAD_DESCRIPTION): New field. (socket): Likewise. (out): Likewise. (in): Likewise. (main): Setup the Socket-based communications with Harness. Return if testname is null. (runtest): Set description at the start to avoid NPE later. If the test throws a Throwable when loading set the description to FAILED_TO_LOAD_DESCRIPTION and print an error message.