diff --git a/x-pack/qa/repository-old-versions/src/test/java/org/elasticsearch/oldrepos/OldRepositoryAccessIT.java b/x-pack/qa/repository-old-versions/src/test/java/org/elasticsearch/oldrepos/OldRepositoryAccessIT.java index c8c72855eaf7a..d283b4d6b9804 100644 --- a/x-pack/qa/repository-old-versions/src/test/java/org/elasticsearch/oldrepos/OldRepositoryAccessIT.java +++ b/x-pack/qa/repository-old-versions/src/test/java/org/elasticsearch/oldrepos/OldRepositoryAccessIT.java @@ -370,11 +370,11 @@ private void assertDocs( Version oldVersion, int numberOfShards ) throws IOException { - RequestOptions v7RequestOptions = RequestOptions.DEFAULT.toBuilder() - .addHeader("Content-Type", "application/vnd.elasticsearch+json;compatible-with=7") - .addHeader("Accept", "application/vnd.elasticsearch+json;compatible-with=7") + RequestOptions v8RequestOptions = RequestOptions.DEFAULT.toBuilder() + .addHeader("Content-Type", "application/vnd.elasticsearch+json;compatible-with=8") + .addHeader("Accept", "application/vnd.elasticsearch+json;compatible-with=8") .build(); - RequestOptions randomRequestOptions = randomBoolean() ? RequestOptions.DEFAULT : v7RequestOptions; + RequestOptions randomRequestOptions = randomBoolean() ? RequestOptions.DEFAULT : v8RequestOptions; // run a search against the index SearchResponse searchResponse = search(index, null, randomRequestOptions);