Why does heap space run out only when running JUnit tests?

前端 未结 5 1659
栀梦
栀梦 2021-01-03 19:11

When running JUnit tests, I always seem to run into this error:

eclipse outOfMemoryError: heap space

I have monitored Eclipse wi

5条回答
  •  温柔的废话
    2021-01-03 19:59

    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.

提交回复
热议问题