diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-12-03 16:08:07 +0100 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-12-03 16:08:07 +0100 |
commit | 1a6316e31ce3e38659e891c64ecca3d63e00e3cf (patch) | |
tree | f638e97da778146896550b4a248dc817a0610034 | |
parent | 545647ca54abd4eaf3c7248a764500ac8514ad2e (diff) |
UseConcMarkSweepGC does not work anywhere with java 17
-rw-r--r-- | config-model/src/test/java/com/yahoo/vespa/model/container/xml/JvmOptionsTest.java | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/JvmOptionsTest.java b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/JvmOptionsTest.java index 3515bb7409e..45546e57808 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/JvmOptionsTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/JvmOptionsTest.java @@ -135,22 +135,28 @@ public class JvmOptionsTest extends ContainerModelBuilderTestBase { // Valid options, should not log anything verifyLoggingOfJvmGcOptions(true, "-XX:+ParallelGCThreads=8"); verifyLoggingOfJvmGcOptions(true, "-XX:MaxTenuringThreshold=15"); // No + or - after colon - verifyLoggingOfJvmGcOptions(false, "-XX:+UseConcMarkSweepGC"); } - @Test - void requireThatInvalidJvmGcOptionsFailDeployment() throws IOException, SAXException { + private void verifyThatInvalidJvmGcOptionsFailDeployment(String options, String expected) throws IOException, SAXException { try { buildModelWithJvmOptions(new TestProperties().setHostedVespa(true), - new TestLogger(), - "gc-options", - "-XX:+ParallelGCThreads=8 foo bar"); + new TestLogger(), "gc-options", options); fail(); } catch (IllegalArgumentException e) { - assertTrue(e.getMessage().startsWith("Invalid or misplaced JVM GC options in services.xml: bar,foo")); + assertTrue(e.getMessage().startsWith(expected)); } } + @Test + void requireThatInvalidJvmGcOptionsFailDeployment() throws IOException, SAXException { + verifyThatInvalidJvmGcOptionsFailDeployment( + "-XX:+ParallelGCThreads=8 foo bar", + "Invalid or misplaced JVM GC options in services.xml: bar,foo"); + verifyThatInvalidJvmGcOptionsFailDeployment( + "-XX:+UseConcMarkSweepGC", + "Invalid or misplaced JVM GC options in services.xml: -XX:+UseConcMarkSweepGC"); + } + private void verifyLoggingOfJvmGcOptions(boolean isHosted, String override, String... invalidOptions) throws IOException, SAXException { verifyLoggingOfJvmOptions(isHosted, "gc-options", override, invalidOptions); } |