Unit tests: Disable a nasty HotSpot optimization that causes exception messages and traces to go missing.

For more information, see http://jawspeak.com/2010/05/26/hotspot-caused-exceptions-to-lose-their-stack-traces-in-production-and-the-fix/
This commit is contained in:
Andreas Schildbach
2017-07-23 14:45:11 +02:00
parent 640dda79f3
commit a2bb46bcd1

View File

@@ -321,7 +321,10 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Xmx1024m ${surefireArgLine}</argLine><!-- Last argument is required for code coverage to work. -->
<!-- First argument increases the maximum heap size, second argument disables a nasty HotSpot optimization
(see http://jawspeak.com/2010/05/26/hotspot-caused-exceptions-to-lose-their-stack-traces-in-production-and-the-fix/)
and last argument is required for code coverage to work. -->
<argLine>-Xmx1024m -XX:-OmitStackTraceInFastThrow ${surefireArgLine}</argLine>
<runOrder>alphabetical</runOrder>
<systemProperties>
<property>