Skip to content

Commit 09f1c10

Browse files
committed
Re-enable and fix the EsqlRestValidationIT test
1 parent 7f2e55f commit 09f1c10

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

x-pack/plugin/esql/qa/server/multi-clusters/src/javaRestTest/java/org/elasticsearch/xpack/esql/ccq/EsqlRestValidationIT.java

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,29 @@ private RestClient remoteClusterClient() throws IOException {
8181
return remoteClient;
8282
}
8383

84+
protected boolean isSkipUnavailable() {
85+
return true;
86+
}
87+
88+
@Override
89+
public void testAlias() throws IOException {
90+
assumeFalse("expecting skip_unavailable to be false", isSkipUnavailable());
91+
super.testAlias();
92+
}
93+
94+
@Override
95+
public void testExistentIndexWithoutWildcard() throws IOException {
96+
assumeFalse("expecting skip_unavailable to be false", isSkipUnavailable());
97+
super.testExistentIndexWithoutWildcard();
98+
}
99+
100+
private static boolean checkVersion(org.elasticsearch.Version version) {
101+
return version.onOrAfter(Version.fromString("9.1.0"))
102+
|| (version.onOrAfter(Version.fromString("8.19.0")) && version.before(Version.fromString("9.0.0")));
103+
}
104+
84105
@Before
85106
public void skipTestOnOldVersions() {
86-
assumeTrue("skip on old versions", Clusters.localClusterVersion().equals(Version.V_8_19_0));
107+
assumeTrue("skip on old versions", checkVersion(Clusters.localClusterVersion()));
87108
}
88109
}

x-pack/plugin/esql/qa/server/multi-clusters/src/javaRestTest/java/org/elasticsearch/xpack/esql/ccq/EsqlRestValidationSkipUnFalseIT.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,9 @@ public class EsqlRestValidationSkipUnFalseIT extends EsqlRestValidationIT {
2727
protected String getTestRestCluster() {
2828
return localCluster.getHttpAddresses();
2929
}
30+
31+
@Override
32+
protected boolean isSkipUnavailable() {
33+
return false;
34+
}
3035
}

0 commit comments

Comments
 (0)