ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: The Cactus/JUnit-Task problem
Date Tue, 19 Feb 2008 05:23:20 GMT
On Mon, 18 Feb 2008, Petar Tahchiev <paranoiabla@gmail.com> wrote:

> Stefan, my patch was almost the same as your improved
> version.

OK, I've committed my changes as a first part.

> However, my patch had these additional lines:
> 
> @@ -1035,7 +1024,7 @@
>              if (watchdog != null && watchdog.killedProcess()) {
>                  result.timedOut = true;
>                  logTimeout(feArray, test, vmCrashString);
> -            } else if
> (!Constants.TERMINATED_SUCCESSFULLY.equals(vmCrashString)) {
> +            } else if
> (!Constants.TERMINATED_SUCCESSFULLY.equals(vmCrashString) &&
> vmCrashString != null) { result.crashed = true; logVmCrash(feArray,
> test, vmCrashString);
>              }

No, that change would be wrong.

Ant's TestRunner writes a file that will contain
Constants.TERMINATED_SUCCESSFULLY if the TestRunner has run to
completion.  This file will be empty or contains anything else if the
forked VM has been terminated before writing the file.

With your change we'd no longer detect crashed forked VMs.

> As you can see I have added the && vmCrashString != null statement,
> because cactus's tests seem to return null when the test is executed
> successfully.

Then we should try to find out why it is null when you run the tests
from Cactus.

How do you start the forked VM?

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message