Monday, July 28, 2014

For You Eclipse & MyEclipse Users: If Your Unit Tests Are Running Out of Heap Space

It won't do you any good to enlarge the maximum heap space size with the -Xmx argument on the command line.  This very useful explanation at StackOverflow describes the cause and the solution:
Junit tests are run in a different vm as the Eclipse IDE. So it is that vm that is out of memory and not the Eclipse one.
You can change the settings of the test vm in the run configurations of the test.
You go to the run configurations and then under arguments, you can set the vm arguments.

No comments: