summaryrefslogtreecommitdiffstats
path: root/config-model/src/test/java/com/yahoo/vespa/model/container/xml/JvmOptionsTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'config-model/src/test/java/com/yahoo/vespa/model/container/xml/JvmOptionsTest.java')
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/container/xml/JvmOptionsTest.java20
1 files changed, 7 insertions, 13 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 45546e57808..3515bb7409e 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,28 +135,22 @@ 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");
}
- private void verifyThatInvalidJvmGcOptionsFailDeployment(String options, String expected) throws IOException, SAXException {
+ @Test
+ void requireThatInvalidJvmGcOptionsFailDeployment() throws IOException, SAXException {
try {
buildModelWithJvmOptions(new TestProperties().setHostedVespa(true),
- new TestLogger(), "gc-options", options);
+ new TestLogger(),
+ "gc-options",
+ "-XX:+ParallelGCThreads=8 foo bar");
fail();
} catch (IllegalArgumentException e) {
- assertTrue(e.getMessage().startsWith(expected));
+ assertTrue(e.getMessage().startsWith("Invalid or misplaced JVM GC options in services.xml: bar,foo"));
}
}
- @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);
}