From 1f63166a27654cf8ea5bf83b02ab7088a4f74cb2 Mon Sep 17 00:00:00 2001 From: Simon Cooper Date: Wed, 1 May 2024 08:55:44 +0100 Subject: [PATCH] Fix JvmGcMonitorServiceSettingsTests (#108082) --- .../monitor/jvm/JvmGcMonitorServiceSettingsTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/test/java/org/elasticsearch/monitor/jvm/JvmGcMonitorServiceSettingsTests.java b/server/src/test/java/org/elasticsearch/monitor/jvm/JvmGcMonitorServiceSettingsTests.java index 96eaceded7eda..0a6f457517b75 100644 --- a/server/src/test/java/org/elasticsearch/monitor/jvm/JvmGcMonitorServiceSettingsTests.java +++ b/server/src/test/java/org/elasticsearch/monitor/jvm/JvmGcMonitorServiceSettingsTests.java @@ -48,7 +48,7 @@ public void testDisabledSetting() throws InterruptedException { public void testNegativeSetting() throws InterruptedException { String collector = randomAlphaOfLength(5); - final String timeValue = "-" + randomTimeValue(2, 1000); // -1 is handled separately + final String timeValue = "-" + randomTimeValue(2, 1000).getStringRep(); // -1 is handled separately Settings settings = Settings.builder().put("monitor.jvm.gc.collector." + collector + ".warn", timeValue).build(); execute(settings, (command, interval, name) -> null, e -> { assertThat(e, instanceOf(IllegalArgumentException.class));