I have a java junit test that passes when run alone on a development machine. We also have a hudson job which runs all the tests, invoked via ant, on a Mac OS X 10.4 node wi
I faced similar issue while running the tests on Jenkins, same tests were passing locally.
I was able resolve the issue by setting log level to WARN
I added TestNG
library to the Test Libraries and it fixed the issue.
Is the VM crashing ? Can you find a dump file (called hs_err_pid*.log
) ? If that's the case, the dump file will give you clues to why this is crashing out.
I had the exact same thing a while back. The problem is that System.exit() is being called somewhere. It can be difficult to find though, as the call could come from either your code or one of the libraries you use.
I had this problem and it turns out that the process was actually calling System.exit(). However there was also a bug in Ant where this was showing up sometimes. I think Ant 1.7.1 has the bug fixed. So make sure you are running that version.
I had this issue too. Changing the junit task from:
<batchtest fork="yes" ... />
to
<batchtest fork="no" ... />
fixed it for me. I don't fully understand this area of ant though or why doing this would fix it. In my scenario it was an error in "BeforeFirstTest" and I think it barfs because of two ant files in my classpath (which is probably what I ought to fix)
I think the issue is with one of the versions of ant: http://track.pmease.com/browse/QB-500;jsessionid=C1CF6999CBBDB5097A9CFCF4A11AF6C0?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
ETA: I think batchtest="no" actually changes the classpath and hence results in exclusion of my offending ant jar.