From 09f1c10669a8ce5828fae5d29f97c55cd824f544 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Tue, 27 May 2025 21:21:24 -0600 Subject: [PATCH 1/5] Re-enable and fix the EsqlRestValidationIT test --- .../xpack/esql/ccq/EsqlRestValidationIT.java | 23 ++++++++++++++++++- .../ccq/EsqlRestValidationSkipUnFalseIT.java | 5 ++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/x-pack/plugin/esql/qa/server/multi-clusters/src/javaRestTest/java/org/elasticsearch/xpack/esql/ccq/EsqlRestValidationIT.java b/x-pack/plugin/esql/qa/server/multi-clusters/src/javaRestTest/java/org/elasticsearch/xpack/esql/ccq/EsqlRestValidationIT.java index aed164f9e8873..ae1ceee8022dc 100644 --- a/x-pack/plugin/esql/qa/server/multi-clusters/src/javaRestTest/java/org/elasticsearch/xpack/esql/ccq/EsqlRestValidationIT.java +++ b/x-pack/plugin/esql/qa/server/multi-clusters/src/javaRestTest/java/org/elasticsearch/xpack/esql/ccq/EsqlRestValidationIT.java @@ -81,8 +81,29 @@ private RestClient remoteClusterClient() throws IOException { return remoteClient; } + protected boolean isSkipUnavailable() { + return true; + } + + @Override + public void testAlias() throws IOException { + assumeFalse("expecting skip_unavailable to be false", isSkipUnavailable()); + super.testAlias(); + } + + @Override + public void testExistentIndexWithoutWildcard() throws IOException { + assumeFalse("expecting skip_unavailable to be false", isSkipUnavailable()); + super.testExistentIndexWithoutWildcard(); + } + + private static boolean checkVersion(org.elasticsearch.Version version) { + return version.onOrAfter(Version.fromString("9.1.0")) + || (version.onOrAfter(Version.fromString("8.19.0")) && version.before(Version.fromString("9.0.0"))); + } + @Before public void skipTestOnOldVersions() { - assumeTrue("skip on old versions", Clusters.localClusterVersion().equals(Version.V_8_19_0)); + assumeTrue("skip on old versions", checkVersion(Clusters.localClusterVersion())); } } diff --git a/x-pack/plugin/esql/qa/server/multi-clusters/src/javaRestTest/java/org/elasticsearch/xpack/esql/ccq/EsqlRestValidationSkipUnFalseIT.java b/x-pack/plugin/esql/qa/server/multi-clusters/src/javaRestTest/java/org/elasticsearch/xpack/esql/ccq/EsqlRestValidationSkipUnFalseIT.java index 4b9957f9f5cea..a79a0d40ab053 100644 --- a/x-pack/plugin/esql/qa/server/multi-clusters/src/javaRestTest/java/org/elasticsearch/xpack/esql/ccq/EsqlRestValidationSkipUnFalseIT.java +++ b/x-pack/plugin/esql/qa/server/multi-clusters/src/javaRestTest/java/org/elasticsearch/xpack/esql/ccq/EsqlRestValidationSkipUnFalseIT.java @@ -27,4 +27,9 @@ public class EsqlRestValidationSkipUnFalseIT extends EsqlRestValidationIT { protected String getTestRestCluster() { return localCluster.getHttpAddresses(); } + + @Override + protected boolean isSkipUnavailable() { + return false; + } } From a1b54cb90c81625cb43af9d28d39489858b466a5 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Tue, 27 May 2025 21:23:18 -0600 Subject: [PATCH 2/5] cleanup --- .../org/elasticsearch/xpack/esql/ccq/EsqlRestValidationIT.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugin/esql/qa/server/multi-clusters/src/javaRestTest/java/org/elasticsearch/xpack/esql/ccq/EsqlRestValidationIT.java b/x-pack/plugin/esql/qa/server/multi-clusters/src/javaRestTest/java/org/elasticsearch/xpack/esql/ccq/EsqlRestValidationIT.java index ae1ceee8022dc..e44ee50e300af 100644 --- a/x-pack/plugin/esql/qa/server/multi-clusters/src/javaRestTest/java/org/elasticsearch/xpack/esql/ccq/EsqlRestValidationIT.java +++ b/x-pack/plugin/esql/qa/server/multi-clusters/src/javaRestTest/java/org/elasticsearch/xpack/esql/ccq/EsqlRestValidationIT.java @@ -97,7 +97,7 @@ public void testExistentIndexWithoutWildcard() throws IOException { super.testExistentIndexWithoutWildcard(); } - private static boolean checkVersion(org.elasticsearch.Version version) { + private static boolean checkVersion(Version version) { return version.onOrAfter(Version.fromString("9.1.0")) || (version.onOrAfter(Version.fromString("8.19.0")) && version.before(Version.fromString("9.0.0"))); } From 4b1badd3d7d050ca6ef9c2657a0c26dd8b804203 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Wed, 28 May 2025 08:55:27 -0600 Subject: [PATCH 3/5] unmute --- muted-tests.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/muted-tests.yml b/muted-tests.yml index b25b5185eb98a..7aa72f416a629 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -486,8 +486,6 @@ tests: - class: org.elasticsearch.xpack.esql.plugin.DataNodeRequestSenderIT method: testSearchWhileRelocating issue: https://github.com/elastic/elasticsearch/issues/128500 -- class: org.elasticsearch.xpack.esql.ccq.EsqlRestValidationIT - issue: https://github.com/elastic/elasticsearch/issues/128543 - class: org.elasticsearch.xpack.ccr.index.engine.FollowingEngineTests method: testProcessOnceOnPrimary issue: https://github.com/elastic/elasticsearch/issues/128541 From 1bf691aa95a82d4392d5bf7ef3ae97e4d02f85c5 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Wed, 28 May 2025 12:16:35 -0600 Subject: [PATCH 4/5] Inline method --- .../xpack/esql/ccq/EsqlRestValidationIT.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/x-pack/plugin/esql/qa/server/multi-clusters/src/javaRestTest/java/org/elasticsearch/xpack/esql/ccq/EsqlRestValidationIT.java b/x-pack/plugin/esql/qa/server/multi-clusters/src/javaRestTest/java/org/elasticsearch/xpack/esql/ccq/EsqlRestValidationIT.java index e44ee50e300af..e51eaca490310 100644 --- a/x-pack/plugin/esql/qa/server/multi-clusters/src/javaRestTest/java/org/elasticsearch/xpack/esql/ccq/EsqlRestValidationIT.java +++ b/x-pack/plugin/esql/qa/server/multi-clusters/src/javaRestTest/java/org/elasticsearch/xpack/esql/ccq/EsqlRestValidationIT.java @@ -97,13 +97,13 @@ public void testExistentIndexWithoutWildcard() throws IOException { super.testExistentIndexWithoutWildcard(); } - private static boolean checkVersion(Version version) { - return version.onOrAfter(Version.fromString("9.1.0")) - || (version.onOrAfter(Version.fromString("8.19.0")) && version.before(Version.fromString("9.0.0"))); - } - @Before public void skipTestOnOldVersions() { - assumeTrue("skip on old versions", checkVersion(Clusters.localClusterVersion())); + Version version = Clusters.localClusterVersion(); + assumeTrue( + "skip on old versions", + version.onOrAfter(Version.fromString("9.1.0")) + || (version.onOrAfter(Version.fromString("8.19.0")) && version.before(Version.fromString("9.0.0"))) + ); } } From ee7eb41f3f024486400aecc1ad7db0fd85c2fa03 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Wed, 28 May 2025 12:19:38 -0600 Subject: [PATCH 5/5] Enable this one too --- .../xpack/esql/ccq/RequestIndexFilteringIT.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/x-pack/plugin/esql/qa/server/multi-clusters/src/javaRestTest/java/org/elasticsearch/xpack/esql/ccq/RequestIndexFilteringIT.java b/x-pack/plugin/esql/qa/server/multi-clusters/src/javaRestTest/java/org/elasticsearch/xpack/esql/ccq/RequestIndexFilteringIT.java index 6f2535c864244..4b192b6aef948 100644 --- a/x-pack/plugin/esql/qa/server/multi-clusters/src/javaRestTest/java/org/elasticsearch/xpack/esql/ccq/RequestIndexFilteringIT.java +++ b/x-pack/plugin/esql/qa/server/multi-clusters/src/javaRestTest/java/org/elasticsearch/xpack/esql/ccq/RequestIndexFilteringIT.java @@ -142,9 +142,8 @@ protected void assertQueryResult(Map result, Matcher columnMa } private static boolean checkVersion(org.elasticsearch.Version version) { - return version.onOrAfter(Version.fromString("9.1.0")); - // TODO: enable this when ported to 8.x - // || (version.onOrAfter(Version.fromString("8.19.0")) && version.before(Version.fromString("9.0.0"))); + return version.onOrAfter(Version.fromString("9.1.0")) + || (version.onOrAfter(Version.fromString("8.19.0")) && version.before(Version.fromString("9.0.0"))); } // We need a separate test since remote missing indices and local missing indices now work differently