From 264abd30417052ac7e5222a0eb2eba58b0dcae50 Mon Sep 17 00:00:00 2001 From: Simon Cooper Date: Thu, 17 Aug 2023 12:48:07 +0100 Subject: [PATCH] Fix another CCS compatibility test (#98585) --- .../java/org/elasticsearch/search/msearch/MultiSearchIT.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/msearch/MultiSearchIT.java b/server/src/internalClusterTest/java/org/elasticsearch/search/msearch/MultiSearchIT.java index f849496c2df16..cc3d21efd71bc 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/msearch/MultiSearchIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/search/msearch/MultiSearchIT.java @@ -16,6 +16,7 @@ import org.elasticsearch.search.DummyQueryBuilder; import org.elasticsearch.search.SearchService; import org.elasticsearch.test.ESIntegTestCase; +import org.elasticsearch.test.TransportVersionUtils; import org.elasticsearch.xcontent.XContentType; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFirstHit; @@ -86,6 +87,7 @@ public void testSimpleMultiSearchMoreRequests() { * Test that triggering the CCS compatibility check with a query that shouldn't go to the minor before Version.CURRENT works */ public void testCCSCheckCompatibility() throws Exception { + TransportVersion transportVersion = TransportVersionUtils.getNextVersion(TransportVersion.MINIMUM_CCS_VERSION, true); createIndex("test"); ensureGreen(); client().prepareIndex("test").setId("1").setSource("field", "xxx").get(); @@ -97,7 +99,7 @@ public void testCCSCheckCompatibility() throws Exception { .add(client().prepareSearch("test").setQuery(new DummyQueryBuilder() { @Override public TransportVersion getMinimalSupportedVersion() { - return TransportVersion.current(); + return transportVersion; } })) .get();