How to increase MaxPermSize for JUnit tests?

While using Idea 10.5 on jdk 1.6.0_24 on OS X 10.6.7, I occasionally get OutOfMemoryError: MaxPermSize errors while running a JUnit test suite of ~1500 JUnit tests.

Using JVisualVM, I can see that the main Idea process has -XX:MaxPermSize=350m (seemingly by default - I do not have bin/idea.vmoptions set up), but that the process which is created to run the tests in (com.intellij.rt.execution.application.AppMain) does not have any startup options set for -Xmx or MaxPermSize or anything else.

Is it possible to configure the heap settings used in the subprocess created to run the JUnit tests in?

2 comments
Comment actions Permalink

Assuming you're using a Run Configuration to run your tests just edit the config (Run -> Edit Configurations) and add your options to the VM parameters field.

If you want that setting to be in place for all future junit tests for that project then also add it to the JUnit configuration under the Defaults node.

0
Comment actions Permalink

Thanks, not sure how I overlooked that!

0

Please sign in to leave a comment.