When running JUnit tests, I always seem to run into this error:
eclipse outOfMemoryError: heap space
I have monitored Eclipse wi
You probably have a memory leak in your JUnit tests. A common gotcha is this: Junit will create a new instance of a TestCase class for every test method in it And all instance variables will be kept around until JUnit terminates. That means: if you have a TestCase class with 50 test methods and an instance variable that is initialized with a 1MB object graph in your setUp() method, then that TestCase class will require 50MB heap space.
Edit: the problem described above only exists in older versions of JUnit, I think it was fixed in JUnit 4.