Increasing memory given to maven using MAVEN_OPTS did not solve the problem. As this setting just increases the memory given to the build process and not the individual test cases. The solution was to use the following configuration in the surefire plugin.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkMode>pertest</forkMode>
<argLine>-Xms256m -Xmx512m</argLine> <testFailureIgnore>false</testFailureIgnore>
<skip>false</skip>
<includes>
<include>**/*IntegrationTestSuite.java</include>
</includes>
</configuration>
</plugin>
The pom for the integration test can be found here. This fixed the heap space issue and now we have our test cases running on the nightly build. You can see the status of our nightly builds at http://builder.wso2.org/browse/MASHUP-NIGHTLY
12 comments:
Sounds like your code is leaking static data structures; might be worth tracking that down...
It works, thank you!
sure does work. I had a hard time figuring this out, that's the very reason I thought a blog post on that will be useful for others facing the same situation. Good to hear that someone befited from it.
We were butting our heads against this for a while. Like you, we tried setting MAVEN_OPTS to no avail. Your solution did work for us. Thanks, Keith!
Our situation is slightly weirder because developers on Macs didn't have problems with running out of memory in the tests but developers in windows did, so we ended up putting our override of memory settings in our individual .m2/settings.xml files.
Thank you very much for this very valuable and interesting post!
Very helpful - thanks a lot!
Thank you. You saved couple of hours of my life.
Thanks for the tip.
I kept increasing MAVEN_OPTS heap size without any effect!
Gotta love Maven... :p
maaan thanku so very much!! god bless!
thanks for the code, it worked like charm for me.
@Mark Kunichika - You could consider putting a Maven profile in your pom.xml that only activates for Windows users, rather than requiring Windows users to edit their settings.xml?
Thank you very much you saved lot of time
Post a Comment