Junit tests do not terminate when using Galileo eclipse on Ubuntu
I'm using Galileo Eclipse on Ubuntu running inside a VirtualBox VM hosted on Windows XP.
Eclipse is running under JDK 1.5 ( via the -vm command line switch )
The project that I am working with runs under JDK 1.3 ( set via the Build Path )
When I run a unit test from within eclipse ( by right clicking the source file and doing "Run as Junit Test"), the test seems to run properly, except it never finishes. The progress bar moves right across to its fullest extent, and the jUnit window gives a strong indication that it has finished, but if I go in to the Debug perspective I can see that 开发者_运维问答the junit process is still running and the only think I can do is to terminate it manually.
If I change the project VM to java 1.5, then the tests work successfully.
If I run the tests from the command line using the "normal" junit textui runner, they work successfully.
Has anyone come across before, or can suggest a workaround? I've not turned up much on my own Google attempts.
Thanks
dave
Do you really, really need JDK 1.3? If so, you may consider running your unit tests as Ant tasks rather than through the shiny Eclipse GUI.
It could be that a thread is left running for some reason, preventing the VM from terminating (perhaps a bug in the 1.3 VM; or a change in behaviour in later versions). Run the unit tests in debug mode to inspect the process.
- Click on the test class -> properties -> run/debug settings
- Select the test class and click on "Edit..."
- Then un-check "Keep JUnit running after ..."
精彩评论