Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 73346 - [junit] allocate more memory to tests
Summary: [junit] allocate more memory to tests
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-07 01:26 EDT by Ralf Hauser CLA
Modified: 2004-09-07 03:48 EDT (History)
0 users

See Also:


Attachments
junitMemory.png (37.08 KB, image/png)
2004-09-07 01:32 EDT, Ralf Hauser CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Hauser CLA 2004-09-07 01:26:38 EDT
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
Comment 1 Ralf Hauser CLA 2004-09-07 01:32:55 EDT
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
Comment 2 Dirk Baeumer CLA 2004-09-07 03:48:32 EDT
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 ?