Community
Participate
Working Groups
as per bug 72022, I am trying to use junit also to test the boundaries of my system size-wise. Eclipse only appears to assign 50M to a junit run by default. Suggestion: make this a fraction of the overall Xmx given to eclipse
Created attachment 14421 [details] junitMemory.png Another interesting finding is that when only given 50M, the test will run for a very long time and use 100% CPU (howling fan). As per the attached, it is easily visible that the sum of what is given to eclipse (highlited in blue) and to junit is only 166M of 768M I allow. When giving the test run -Xmx256 or more as a vmarg, it immediately throws outOfMemory. Also, when giving it -Xmx768, i.e. more than the ~120M of eclipse and what I give to tomcat as per bug 72022, it still gets the outOfMemory exception while tomcat doesn't. So one suggestion at least is to allocate e.g. 50% of the Xmx and not just 50M by default
Eclipse doesn't assign any memory (doesn't pass -Xmx arg to the VM) when you start a JUnit test case. The VM default is taken. Doing so isn't good pratice since eclipse doesn't actually know how much memory the target process needs. The way to go here is to specify the corresponding VM args (which can vary from VM to VM) in the launch config. Erich, any idea regarding why the JUnit tests rus with 100% CPU with less memory and throws OutOfMemory with more ?