added -XX JVM options to be able to analyze OOMs in SingleFeatureTest 14/53114/2
authorMichael Vorburger <vorburger@redhat.com>
Fri, 10 Mar 2017 01:50:51 +0000 (02:50 +0100)
committerStephen Kitt <skitt@redhat.com>
Tue, 21 Mar 2017 16:28:13 +0000 (16:28 +0000)
  -XX:+HeapDumpOnOutOfMemoryError
  -XX:OnOutOfMemoryError="kill -3 %p"

Change-Id: Ide5d8cb96fc46e61a101adba3022de333b3fc1aa
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
features-test/src/main/java/org/opendaylight/odlparent/featuretest/SingleFeatureTest.java
features4-test/src/main/java/org/opendaylight/odlparent/featuretest/SingleFeatureTest.java

index 936d1b3a6f842abc151f156f14ca8437231d30ce..27d16c7a6d37bae9c5de6a1a93ad90fb558895ac 100644 (file)
@@ -137,6 +137,8 @@ public class SingleFeatureTest {
         return new Option[] {
             // TODO: Find a way to inherit memory limits from Maven options.
             new VMOption("-Xmx2g"),
+            new VMOption("-XX:+HeapDumpOnOutOfMemoryError"),
+            new VMOption("-XX:OnOutOfMemoryError=\"kill -3 %p\""),
             // inspired by org.apache.commons.lang.SystemUtils
             when(System.getProperty("os.name").toLowerCase().startsWith("linux")).useOptions(
                 // This prevents low entropy issues on Linux to affect Java random numbers
index 26101020a4bb3f43711b8a39270857a58fc6e1b2..e20125c04948314e5300080b2d6e1aeb08d7e115 100644 (file)
@@ -139,6 +139,8 @@ public class SingleFeatureTest {
         return new Option[] {
             // TODO: Find a way to inherit memory limits from Maven options.
             new VMOption("-Xmx2g"),
+            new VMOption("-XX:+HeapDumpOnOutOfMemoryError"),
+            new VMOption("-XX:OnOutOfMemoryError=\"kill -3 %p\""),
             // inspired by org.apache.commons.lang.SystemUtils
             when(System.getProperty("os.name").toLowerCase().startsWith("linux")).useOptions(
                 // This prevents low entropy issues on Linux to affect Java random numbers