From da8916694596b5eb3d6065aed24c5507fbc5e527 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Tue, 29 Oct 2024 14:28:05 +0100 Subject: [PATCH] Tweak Logsdb* and TsdbIndexingRollingUpgradeIT Adjust assertion to more losely detect an error that can be ignored. Closes #115817 --- .../upgrades/LogsdbIndexingRollingUpgradeIT.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/LogsdbIndexingRollingUpgradeIT.java b/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/LogsdbIndexingRollingUpgradeIT.java index 226cb3dda2ba1..9cb91438e09c0 100644 --- a/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/LogsdbIndexingRollingUpgradeIT.java +++ b/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/LogsdbIndexingRollingUpgradeIT.java @@ -28,10 +28,7 @@ import static org.elasticsearch.upgrades.LogsIndexModeRollingUpgradeIT.enableLogsdbByDefault; import static org.elasticsearch.upgrades.LogsIndexModeRollingUpgradeIT.getWriteBackingIndex; import static org.elasticsearch.upgrades.TsdbIT.formatInstant; -import static org.hamcrest.Matchers.equalTo; -import static org.hamcrest.Matchers.greaterThan; -import static org.hamcrest.Matchers.greaterThanOrEqualTo; -import static org.hamcrest.Matchers.notNullValue; +import static org.hamcrest.Matchers.*; public class LogsdbIndexingRollingUpgradeIT extends AbstractRollingUpgradeTestCase { @@ -240,7 +237,7 @@ protected static void startTrial() throws IOException { } catch (ResponseException e) { var responseBody = entityAsMap(e.getResponse()); String error = ObjectPath.evaluate(responseBody, "error_message"); - assertThat(error, equalTo("Trial was already activated.")); + assertThat(error, containsString("Trial was already activated.")); } }