Skip to content

Commit f864c0f

Browse files
committed
Don't run on old versions
1 parent e2fed76 commit f864c0f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
1111

1212
import org.apache.http.HttpHost;
13+
import org.elasticsearch.Version;
1314
import org.elasticsearch.client.Request;
1415
import org.elasticsearch.client.ResponseException;
1516
import org.elasticsearch.client.RestClient;
@@ -140,8 +141,15 @@ protected void assertQueryResult(Map<String, Object> result, Matcher<?> columnMa
140141
assertMap(result, matcher);
141142
}
142143

144+
private static boolean checkVersion(org.elasticsearch.Version version) {
145+
return version.onOrAfter(Version.fromString("9.1.0"))
146+
|| (version.onOrAfter(Version.fromString("8.19.0")) && version.before(Version.fromString("9.0.0")));
147+
}
148+
143149
// We need a separate test since remote missing indices and local missing indices now work differently
144150
public void testIndicesDontExistRemote() throws IOException {
151+
// Exclude old versions
152+
assumeTrue("Only works with latest support_unavailable logic", checkVersion(Clusters.localClusterVersion()));
145153
int docsTest1 = randomIntBetween(1, 5);
146154
indexTimestampData(docsTest1, "test1", "2024-11-26", "id1");
147155

0 commit comments

Comments
 (0)