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

前端 未结 5 1634
栀梦
栀梦 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:47

    Further to @Thijs Wouters response, to fix this issue in eclipse I did the following:

    • Added a new Run configuration under JUnit (Run>Run configuration>JUnit>New)
    • Within the arguments tab set VM arguments to "-Xms64m -Xmx256m" or higher if needs be

提交回复
热议问题