Skip to content

Commit

Permalink
Fix another CCS compatibility test (elastic#98585)
Browse files Browse the repository at this point in the history
  • Loading branch information
thecoop authored Aug 17, 2023
1 parent 9538208 commit 264abd3
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand All @@ -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();
Expand Down

0 comments on commit 264abd3

Please sign in to comment.