Strategy for debugging surefire “The forked VM terminated without saying properly goodbye. VM crash or System.exit called ?”

后端 未结 11 832
野的像风
野的像风 2020-12-05 02:11

I am working on a rather complex java project with many dependencies and many unit tests.

I am using java 1.6.0_65 on mac (mavericks) with maven 3.0.5 with maven-sur

11条回答
  •  萌比男神i
    2020-12-05 03:00

    If anyone is including a custom argLine argument, you must reconsider because it is likely the source of your issues with the memory allocation.

    For Example (I used to have):

    XX:MaxPermSize=4096m ${argLine}
    

    Now I use hard specified values:

    -Xmx1024m -XX:MaxPermSize=256m
    

    For whatever reason, Applications that integrate with Surefire such as Jacoco, dont request enough memory to coexist with the testing that happens at build time.

    (more information can also be found at this s.o. question (1))

    (1)-maven jacoco: not generating code coverage report

提交回复
热议问题