问题
I have suite of Junit tests which passes every time I run locally. I have setup a job to run the suite, hudson uses ANT to invoke the tests.This suite was passing in the hudson machine for quite some time. But from last 3 days one test fails some times (randomly). And We have not changed to code. The error is :
Error Message
Forked Java VM exited abnormally. Please note the time in the report does not reflect the time until the VM exit.
Stacktrace
junit.framework.AssertionFailedError: Forked Java VM exited abnormally. Please note the time in the report does not reflect the time until the VM exit.
I couldn't find proper answer on google. I checked here
but it doesn't seem to help.
Hudson machine details : Windows 2003 Server Java 1.6.0.29
回答1:
Do you still have access to the console log for the failed Hudson build? If the JVM is exiting 'unexpectedly' you may find a JVM bug is causing it to crash, which would not appear in the JUnit logs (which I assume is where you've got the error message/stack trace from), but probably would do in the output from Ant.
Alternatively:
- Which version of Ant are you running? I have heard of a bug pre-Ant 1.7.1 that caused
System.exit()
to be called under some circumstances. - You may want to check that your code is not catching any exceptions that it shouldn't be (e.g.
catch Throwable
).
来源:https://stackoverflow.com/questions/8799855/randomly-test-case-fails-forked-jvm-exits-abnormally