Here is the patch (currently not in the state that i could apply it..)
On 12/12/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
 Hi,

 I have prepared a patch for the vmwatcher file missing, will apply it
 after 1.7.0 is released.

Hi Martijn,
what does it consist of?

The times that I have seen missing vmwatcher files is due to a classpath
problem - either a) the junitrunner class cannot be loaded or b) an
old junitrunner class is loaded.
I fear that b) may happen with people getting ant.1.6 jars in by accident.
Peter


 Martijn

 ---------------------------------------------------------------------
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Index: src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
===================================================================
--- src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java        
(revision 486298)
+++ src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java        
(working copy)
@@ -1025,13 +1025,20 @@
             String vmCrashString = "unknown";
             BufferedReader br = null;
             try {
-                br = new BufferedReader(new FileReader(vmWatcher));
-                vmCrashString = br.readLine();
+                if (vmWatcher.exists()) {
+                    br = new BufferedReader(new FileReader(vmWatcher));
+                    vmCrashString = br.readLine();
+                } else {
+                    vmCrashString = "Monitor file 
("+vmWatcher.getAbsolutePath()+") missing, location writable? Alternatively 
testcase not started!";
+                }
             } catch (Exception e) {
                 e.printStackTrace();
                 // ignored.
             } finally {
                 FileUtils.close(br);
+                if (vmWatcher.exists()) {
+                    vmWatcher.delete();
+                }
             }
             if (watchdog != null && watchdog.killedProcess()) {
                 result.timedOut = true;
@@ -1040,7 +1047,6 @@
                 result.crashed = true;
                 logVmCrash(feArray, test, vmCrashString);
             }
-            vmWatcher.delete();
 
             if (!propsFile.delete()) {
                 throw new BuildException("Could not delete temporary "
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to