java - Memory error when running unit tests in SonarQube -- forked VM terminated without saying properly goodbye -
java - Memory error when running unit tests in SonarQube -- forked VM terminated without saying properly goodbye -
we consistently getting out of memory errors when running our sonar analysis. intermittent across machines, seems 1 time it, persists.
[error] failed execute goal org.apache.maven.plugins:maven-surefire-plugin:2.16:test (default-cli) on project optimus-client-web-configuration: execution default-cli of goal org.apache.maven.plugins: maven-surefire-plugin:2.16:test failed: forked vm terminated without saying goodbye. vm crash or system.exit called ? [error] command wascmd.exe /x /c ""c:\program files\java\jdk1.7.0_45\jre\bin\java" -javaagent:c:\users\cxxx\appdata\local\temp\jacocoagent8301608889470684052.jar=destfile=target/jacoco.exec,excludes= *_javassist_* -jar c:\redesign_trunk\optimus-lms-server\optimus-client-web-configuration\target\surefire\surefirebooter2312966376869893038.jar c:\redesign_trunk\optimus-lms-server\optimus-client-web-con figuration\target\surefire\surefire350975689095180011tmp c:\redesign_trunk\xxx-xx-server\xxx\target\surefire\surefire_45613339175612175619tmp"
the unit tests not fail when running before sonar phase. occurring on 1 particular test activates spring configuration test works okay. test consumes more memory since has load whole context.
i upped memory in maven_opts utilize 1024m max heap. added configuration pom
<plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-surefire-plugin</artifactid> <version>2.16</version> <configuration> <argline>-xmx1024m</argline> </configuration> </plugin>
in configuration configuring surefire plugin utilize memory when spawns new jvm, need increment memory mvn
's jvm well
export maven_opts="-xmx2048m"
try above (with proper memory size)
java maven out-of-memory sonarqube maven-surefire-plugin
Comments
Post a Comment