Skip to content

Commit 91a052b

Browse files
committed
Merge branch 'master' into ccr
* master: Add hook to skip asserting x-content equivalence (#33114) Muted testListenersThrowingExceptionsDoNotCauseOtherListenersToBeSkipped [Rollup] Move getMetadata() methods out of rollup config objects (#32579) Muted testEmptyAuthorizedIndicesSearchForAllDisallowNoIndices Update Google Cloud Storage Library for Java (#32940) Remove unsupported Version.V_5_* (#32937)
2 parents b0f22d6 + 619e0b2 commit 91a052b

File tree

250 files changed

+706
-3287
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

250 files changed

+706
-3287
lines changed

buildSrc/src/main/groovy/org/elasticsearch/gradle/VersionCollection.groovy

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,8 @@ class VersionCollection {
138138
break
139139
}
140140
}
141-
// caveat 0 - now dip back 2 versions to get the last supported snapshot version of the line
142-
Version highestMinor = getHighestPreviousMinor(currentVersion.major - 1)
143-
maintenanceBugfixSnapshot = replaceAsSnapshot(highestMinor)
141+
// caveat 0 - the last supported snapshot of the line is on a version that we don't support (N-2)
142+
maintenanceBugfixSnapshot = null
144143
} else {
145144
// caveat 3 did not apply. version is not a X.0.0, so we are somewhere on a X.Y line
146145
// only check till minor == 0 of the major
@@ -293,7 +292,8 @@ class VersionCollection {
293292
* If you have a list [5.0.2, 5.1.2, 6.0.1, 6.1.1] and pass in 6 for the nextMajorVersion, it will return you 5.1.2
294293
*/
295294
private Version getHighestPreviousMinor(Integer nextMajorVersion) {
296-
return versionSet.headSet(Version.fromString("${nextMajorVersion}.0.0")).last()
295+
SortedSet<Version> result = versionSet.headSet(Version.fromString("${nextMajorVersion}.0.0"))
296+
return result.isEmpty() ? null : result.last()
297297
}
298298

299299
/**

buildSrc/src/test/groovy/org/elasticsearch/gradle/VersionCollectionTests.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class VersionCollectionTests extends GradleUnitTestCase {
2626
assertEquals(vc.nextMinorSnapshot, Version.fromString("6.3.0-SNAPSHOT"))
2727
assertEquals(vc.stagedMinorSnapshot, Version.fromString("6.2.0-SNAPSHOT"))
2828
assertEquals(vc.nextBugfixSnapshot, Version.fromString("6.1.1-SNAPSHOT"))
29-
assertEquals(vc.maintenanceBugfixSnapshot, Version.fromString("5.2.1-SNAPSHOT"))
29+
assertNull(vc.maintenanceBugfixSnapshot)
3030

3131
vc.indexCompatible.containsAll(vc.versions)
3232

@@ -65,7 +65,7 @@ class VersionCollectionTests extends GradleUnitTestCase {
6565
assertEquals(vc.nextMinorSnapshot, Version.fromString("6.3.0-SNAPSHOT"))
6666
assertEquals(vc.stagedMinorSnapshot, null)
6767
assertEquals(vc.nextBugfixSnapshot, Version.fromString("6.2.1-SNAPSHOT"))
68-
assertEquals(vc.maintenanceBugfixSnapshot, Version.fromString("5.2.1-SNAPSHOT"))
68+
assertNull(vc.maintenanceBugfixSnapshot)
6969

7070
vc.indexCompatible.containsAll(vc.versions)
7171

modules/analysis-common/src/test/java/org/elasticsearch/analysis/common/CommonAnalysisPluginTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public void testNGramDeprecationWarning() throws IOException {
6464
public void testNGramNoDeprecationWarningPre6_4() throws IOException {
6565
Settings settings = Settings.builder().put(Environment.PATH_HOME_SETTING.getKey(), createTempDir())
6666
.put(IndexMetaData.SETTING_VERSION_CREATED,
67-
VersionUtils.randomVersionBetween(random(), Version.V_5_0_0, Version.V_6_3_0))
67+
VersionUtils.randomVersionBetween(random(), Version.V_6_0_0, Version.V_6_3_0))
6868
.build();
6969

7070
IndexSettings idxSettings = IndexSettingsModule.newIndexSettings("index", settings);
@@ -104,7 +104,7 @@ public void testEdgeNGramDeprecationWarning() throws IOException {
104104
public void testEdgeNGramNoDeprecationWarningPre6_4() throws IOException {
105105
Settings settings = Settings.builder().put(Environment.PATH_HOME_SETTING.getKey(), createTempDir())
106106
.put(IndexMetaData.SETTING_VERSION_CREATED,
107-
VersionUtils.randomVersionBetween(random(), Version.V_5_0_0, Version.V_6_3_0))
107+
VersionUtils.randomVersionBetween(random(), Version.V_6_0_0, Version.V_6_3_0))
108108
.build();
109109

110110
IndexSettings idxSettings = IndexSettingsModule.newIndexSettings("index", settings);

modules/analysis-common/src/test/java/org/elasticsearch/analysis/common/HtmlStripCharFilterFactoryTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public void testDeprecationWarning() throws IOException {
6060
public void testNoDeprecationWarningPre6_3() throws IOException {
6161
Settings settings = Settings.builder().put(Environment.PATH_HOME_SETTING.getKey(), createTempDir())
6262
.put(IndexMetaData.SETTING_VERSION_CREATED,
63-
VersionUtils.randomVersionBetween(random(), Version.V_5_0_0, Version.V_6_2_4))
63+
VersionUtils.randomVersionBetween(random(), Version.V_6_0_0, Version.V_6_2_4))
6464
.build();
6565

6666
IndexSettings idxSettings = IndexSettingsModule.newIndexSettings("index", settings);

modules/lang-mustache/src/main/java/org/elasticsearch/script/mustache/MultiSearchTemplateRequest.java

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
package org.elasticsearch.script.mustache;
2121

22-
import org.elasticsearch.Version;
2322
import org.elasticsearch.action.ActionRequest;
2423
import org.elasticsearch.action.ActionRequestValidationException;
2524
import org.elasticsearch.action.CompositeIndicesRequest;
@@ -120,21 +119,17 @@ public MultiSearchTemplateRequest indicesOptions(IndicesOptions indicesOptions)
120119
@Override
121120
public void readFrom(StreamInput in) throws IOException {
122121
super.readFrom(in);
123-
if (in.getVersion().onOrAfter(Version.V_5_5_0)) {
124-
maxConcurrentSearchRequests = in.readVInt();
125-
}
122+
maxConcurrentSearchRequests = in.readVInt();
126123
requests = in.readStreamableList(SearchTemplateRequest::new);
127124
}
128125

129126
@Override
130127
public void writeTo(StreamOutput out) throws IOException {
131128
super.writeTo(out);
132-
if (out.getVersion().onOrAfter(Version.V_5_5_0)) {
133-
out.writeVInt(maxConcurrentSearchRequests);
134-
}
129+
out.writeVInt(maxConcurrentSearchRequests);
135130
out.writeStreamableList(requests);
136131
}
137-
132+
138133
@Override
139134
public boolean equals(Object o) {
140135
if (this == o) return true;
@@ -148,9 +143,9 @@ public boolean equals(Object o) {
148143
@Override
149144
public int hashCode() {
150145
return Objects.hash(maxConcurrentSearchRequests, requests, indicesOptions);
151-
}
152-
153-
public static byte[] writeMultiLineFormat(MultiSearchTemplateRequest multiSearchTemplateRequest,
146+
}
147+
148+
public static byte[] writeMultiLineFormat(MultiSearchTemplateRequest multiSearchTemplateRequest,
154149
XContent xContent) throws IOException {
155150
ByteArrayOutputStream output = new ByteArrayOutputStream();
156151
for (SearchTemplateRequest templateRequest : multiSearchTemplateRequest.requests()) {
@@ -168,5 +163,5 @@ public static byte[] writeMultiLineFormat(MultiSearchTemplateRequest multiSearch
168163
}
169164
return output.toByteArray();
170165
}
171-
166+
172167
}

modules/parent-join/src/main/java/org/elasticsearch/join/query/HasChildQueryBuilder.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import org.apache.lucene.search.join.JoinUtil;
2828
import org.apache.lucene.search.join.ScoreMode;
2929
import org.apache.lucene.search.similarities.Similarity;
30-
import org.elasticsearch.Version;
3130
import org.elasticsearch.common.ParseField;
3231
import org.elasticsearch.common.ParsingException;
3332
import org.elasticsearch.common.io.stream.StreamInput;
@@ -125,15 +124,7 @@ protected void doWriteTo(StreamOutput out) throws IOException {
125124
out.writeInt(maxChildren);
126125
out.writeVInt(scoreMode.ordinal());
127126
out.writeNamedWriteable(query);
128-
if (out.getVersion().before(Version.V_5_5_0)) {
129-
final boolean hasInnerHit = innerHitBuilder != null;
130-
out.writeBoolean(hasInnerHit);
131-
if (hasInnerHit) {
132-
innerHitBuilder.writeToParentChildBWC(out, query, type);
133-
}
134-
} else {
135-
out.writeOptionalWriteable(innerHitBuilder);
136-
}
127+
out.writeOptionalWriteable(innerHitBuilder);
137128
out.writeBoolean(ignoreUnmapped);
138129
}
139130

modules/parent-join/src/main/java/org/elasticsearch/join/query/HasParentQueryBuilder.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import org.apache.lucene.search.MatchNoDocsQuery;
2222
import org.apache.lucene.search.Query;
2323
import org.apache.lucene.search.join.ScoreMode;
24-
import org.elasticsearch.Version;
2524
import org.elasticsearch.common.ParseField;
2625
import org.elasticsearch.common.ParsingException;
2726
import org.elasticsearch.common.io.stream.StreamInput;
@@ -97,15 +96,7 @@ protected void doWriteTo(StreamOutput out) throws IOException {
9796
out.writeString(type);
9897
out.writeBoolean(score);
9998
out.writeNamedWriteable(query);
100-
if (out.getVersion().before(Version.V_5_5_0)) {
101-
final boolean hasInnerHit = innerHitBuilder != null;
102-
out.writeBoolean(hasInnerHit);
103-
if (hasInnerHit) {
104-
innerHitBuilder.writeToParentChildBWC(out, query, type);
105-
}
106-
} else {
107-
out.writeOptionalWriteable(innerHitBuilder);
108-
}
99+
out.writeOptionalWriteable(innerHitBuilder);
109100
out.writeBoolean(ignoreUnmapped);
110101
}
111102

modules/parent-join/src/test/java/org/elasticsearch/join/query/HasChildQueryBuilderTests.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,6 @@ protected void doAssertLuceneQuery(HasChildQueryBuilder queryBuilder, Query quer
196196
public void testSerializationBWC() throws IOException {
197197
for (Version version : VersionUtils.allReleasedVersions()) {
198198
HasChildQueryBuilder testQuery = createTestQueryBuilder();
199-
if (version.before(Version.V_5_2_0) && testQuery.innerHit() != null) {
200-
// ignore unmapped for inner_hits has been added on 5.2
201-
testQuery.innerHit().setIgnoreUnmapped(false);
202-
}
203199
assertSerialization(testQuery, version);
204200
}
205201
}

modules/parent-join/src/test/java/org/elasticsearch/join/query/HasParentQueryBuilderTests.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,6 @@ protected void doAssertLuceneQuery(HasParentQueryBuilder queryBuilder, Query que
171171
public void testSerializationBWC() throws IOException {
172172
for (Version version : VersionUtils.allReleasedVersions()) {
173173
HasParentQueryBuilder testQuery = createTestQueryBuilder();
174-
if (version.before(Version.V_5_2_0) && testQuery.innerHit() != null) {
175-
// ignore unmapped for inner_hits has been added on 5.2
176-
testQuery.innerHit().setIgnoreUnmapped(false);
177-
}
178174
assertSerialization(testQuery, version);
179175
}
180176
}

modules/percolator/src/main/java/org/elasticsearch/percolator/PercolateQueryBuilder.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -272,11 +272,7 @@ public PercolateQueryBuilder(String field, String documentType, String indexedDo
272272
documents = document != null ? Collections.singletonList(document) : Collections.emptyList();
273273
}
274274
if (documents.isEmpty() == false) {
275-
if (in.getVersion().onOrAfter(Version.V_5_3_0)) {
276-
documentXContentType = in.readEnum(XContentType.class);
277-
} else {
278-
documentXContentType = XContentHelper.xContentType(documents.iterator().next());
279-
}
275+
documentXContentType = in.readEnum(XContentType.class);
280276
} else {
281277
documentXContentType = null;
282278
}
@@ -329,7 +325,7 @@ protected void doWriteTo(StreamOutput out) throws IOException {
329325
BytesReference doc = documents.isEmpty() ? null : documents.iterator().next();
330326
out.writeOptionalBytesReference(doc);
331327
}
332-
if (documents.isEmpty() == false && out.getVersion().onOrAfter(Version.V_5_3_0)) {
328+
if (documents.isEmpty() == false) {
333329
out.writeEnum(documentXContentType);
334330
}
335331
}

modules/percolator/src/test/java/org/elasticsearch/percolator/PercolateQueryBuilderTests.java

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import org.apache.lucene.search.MatchAllDocsQuery;
2828
import org.apache.lucene.search.Query;
2929
import org.elasticsearch.ResourceNotFoundException;
30-
import org.elasticsearch.Version;
3130
import org.elasticsearch.action.admin.indices.mapping.put.PutMappingRequest;
3231
import org.elasticsearch.action.get.GetRequest;
3332
import org.elasticsearch.action.get.GetResponse;
@@ -36,7 +35,6 @@
3635
import org.elasticsearch.common.bytes.BytesReference;
3736
import org.elasticsearch.common.compress.CompressedXContent;
3837
import org.elasticsearch.common.io.stream.BytesStreamOutput;
39-
import org.elasticsearch.common.io.stream.StreamInput;
4038
import org.elasticsearch.common.xcontent.XContentBuilder;
4139
import org.elasticsearch.common.xcontent.XContentFactory;
4240
import org.elasticsearch.common.xcontent.XContentType;
@@ -57,7 +55,6 @@
5755
import java.io.UncheckedIOException;
5856
import java.util.ArrayList;
5957
import java.util.Arrays;
60-
import java.util.Base64;
6158
import java.util.Collection;
6259
import java.util.Collections;
6360
import java.util.HashSet;
@@ -294,26 +291,6 @@ public void testCreateMultiDocumentSearcher() throws Exception {
294291
assertThat(result.clauses().get(1).getOccur(), equalTo(BooleanClause.Occur.MUST_NOT));
295292
}
296293

297-
public void testSerializationBwc() throws IOException {
298-
final byte[] data = Base64.getDecoder().decode("P4AAAAAFZmllbGQEdHlwZQAAAAAAAA57ImZvbyI6ImJhciJ9AAAAAA==");
299-
final Version version = randomFrom(Version.V_5_0_0, Version.V_5_0_1, Version.V_5_0_2,
300-
Version.V_5_1_1, Version.V_5_1_2, Version.V_5_2_0);
301-
try (StreamInput in = StreamInput.wrap(data)) {
302-
in.setVersion(version);
303-
PercolateQueryBuilder queryBuilder = new PercolateQueryBuilder(in);
304-
assertEquals("type", queryBuilder.getDocumentType());
305-
assertEquals("field", queryBuilder.getField());
306-
assertEquals("{\"foo\":\"bar\"}", queryBuilder.getDocuments().iterator().next().utf8ToString());
307-
assertEquals(XContentType.JSON, queryBuilder.getXContentType());
308-
309-
try (BytesStreamOutput out = new BytesStreamOutput()) {
310-
out.setVersion(version);
311-
queryBuilder.writeTo(out);
312-
assertArrayEquals(data, out.bytes().toBytesRef().bytes);
313-
}
314-
}
315-
}
316-
317294
private static BytesReference randomSource(Set<String> usedFields) {
318295
try {
319296
// If we create two source that have the same field, but these fields have different kind of values (str vs. lng) then

modules/percolator/src/test/java/org/elasticsearch/percolator/QueryBuilderStoreTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public void testStoringQueryBuilders() throws IOException {
7474
BinaryFieldMapper fieldMapper = PercolatorFieldMapper.Builder.createQueryBuilderFieldBuilder(
7575
new Mapper.BuilderContext(settings, new ContentPath(0)));
7676

77-
Version version = randomBoolean() ? Version.V_5_6_0 : Version.V_6_0_0_beta2;
77+
Version version = Version.V_6_0_0_beta2;
7878
try (IndexWriter indexWriter = new IndexWriter(directory, config)) {
7979
for (int i = 0; i < queryBuilders.length; i++) {
8080
queryBuilders[i] = new TermQueryBuilder(randomAlphaOfLength(4), randomAlphaOfLength(8));

modules/reindex/src/main/java/org/elasticsearch/index/reindex/remote/RemoteRequestBuilders.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ static Request initialSearch(SearchRequest searchRequest, BytesReference query,
6161

6262
if (searchRequest.scroll() != null) {
6363
TimeValue keepAlive = searchRequest.scroll().keepAlive();
64-
if (remoteVersion.before(Version.V_5_0_0)) {
64+
// V_5_0_0
65+
if (remoteVersion.before(Version.fromId(5000099))) {
6566
/* Versions of Elasticsearch before 5.0 couldn't parse nanos or micros
6667
* so we toss out that resolution, rounding up because more scroll
6768
* timeout seems safer than less. */
@@ -117,7 +118,8 @@ static Request initialSearch(SearchRequest searchRequest, BytesReference query,
117118
for (int i = 1; i < searchRequest.source().storedFields().fieldNames().size(); i++) {
118119
fields.append(',').append(searchRequest.source().storedFields().fieldNames().get(i));
119120
}
120-
String storedFieldsParamName = remoteVersion.before(Version.V_5_0_0_alpha4) ? "fields" : "stored_fields";
121+
// V_5_0_0
122+
String storedFieldsParamName = remoteVersion.before(Version.fromId(5000099)) ? "fields" : "stored_fields";
121123
request.addParameter(storedFieldsParamName, fields.toString());
122124
}
123125

@@ -186,7 +188,8 @@ private static String sortToUri(SortBuilder<?> sort) {
186188
static Request scroll(String scroll, TimeValue keepAlive, Version remoteVersion) {
187189
Request request = new Request("POST", "/_search/scroll");
188190

189-
if (remoteVersion.before(Version.V_5_0_0)) {
191+
// V_5_0_0
192+
if (remoteVersion.before(Version.fromId(5000099))) {
190193
/* Versions of Elasticsearch before 5.0 couldn't parse nanos or micros
191194
* so we toss out that resolution, rounding up so we shouldn't end up
192195
* with 0s. */

modules/reindex/src/test/java/org/elasticsearch/index/reindex/RoundTripTests.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,8 @@ private void assertRequestEquals(Version version, ReindexRequest request, Reinde
155155
assertEquals(request.getRemoteInfo().getUsername(), tripped.getRemoteInfo().getUsername());
156156
assertEquals(request.getRemoteInfo().getPassword(), tripped.getRemoteInfo().getPassword());
157157
assertEquals(request.getRemoteInfo().getHeaders(), tripped.getRemoteInfo().getHeaders());
158-
if (version.onOrAfter(Version.V_5_2_0)) {
159-
assertEquals(request.getRemoteInfo().getSocketTimeout(), tripped.getRemoteInfo().getSocketTimeout());
160-
assertEquals(request.getRemoteInfo().getConnectTimeout(), tripped.getRemoteInfo().getConnectTimeout());
161-
} else {
162-
assertEquals(RemoteInfo.DEFAULT_SOCKET_TIMEOUT, tripped.getRemoteInfo().getSocketTimeout());
163-
assertEquals(RemoteInfo.DEFAULT_CONNECT_TIMEOUT, tripped.getRemoteInfo().getConnectTimeout());
164-
}
158+
assertEquals(request.getRemoteInfo().getSocketTimeout(), tripped.getRemoteInfo().getSocketTimeout());
159+
assertEquals(request.getRemoteInfo().getConnectTimeout(), tripped.getRemoteInfo().getConnectTimeout());
165160
}
166161
}
167162

modules/reindex/src/test/java/org/elasticsearch/index/reindex/remote/RemoteRequestBuildersTests.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,15 @@ public void testInitialSearchParamsFields() {
136136
// Test stored_fields for versions that support it
137137
searchRequest = new SearchRequest().source(new SearchSourceBuilder());
138138
searchRequest.source().storedField("_source").storedField("_id");
139-
remoteVersion = Version.fromId(between(Version.V_5_0_0_alpha4_ID, Version.CURRENT.id));
139+
// V_5_0_0_alpha4 => current
140+
remoteVersion = Version.fromId(between(5000004, Version.CURRENT.id));
140141
assertThat(initialSearch(searchRequest, query, remoteVersion).getParameters(), hasEntry("stored_fields", "_source,_id"));
141142

142143
// Test fields for versions that support it
143144
searchRequest = new SearchRequest().source(new SearchSourceBuilder());
144145
searchRequest.source().storedField("_source").storedField("_id");
145-
remoteVersion = Version.fromId(between(2000099, Version.V_5_0_0_alpha4_ID - 1));
146+
// V_2_0_0 => V_5_0_0_alpha3
147+
remoteVersion = Version.fromId(between(2000099, 5000003));
146148
assertThat(initialSearch(searchRequest, query, remoteVersion).getParameters(), hasEntry("fields", "_source,_id"));
147149

148150
// Test extra fields for versions that need it
@@ -190,7 +192,8 @@ public void testInitialSearchParamsMisc() {
190192
}
191193

192194
private void assertScroll(Version remoteVersion, Map<String, String> params, TimeValue requested) {
193-
if (remoteVersion.before(Version.V_5_0_0)) {
195+
// V_5_0_0
196+
if (remoteVersion.before(Version.fromId(5000099))) {
194197
// Versions of Elasticsearch prior to 5.0 can't parse nanos or micros in TimeValue.
195198
assertThat(params.get("scroll"), not(either(endsWith("nanos")).or(endsWith("micros"))));
196199
if (requested.getStringRep().endsWith("nanos") || requested.getStringRep().endsWith("micros")) {
@@ -242,7 +245,7 @@ public void testScrollParams() {
242245

243246
public void testScrollEntity() throws IOException {
244247
String scroll = randomAlphaOfLength(30);
245-
HttpEntity entity = scroll(scroll, timeValueMillis(between(1, 1000)), Version.V_5_0_0).getEntity();
248+
HttpEntity entity = scroll(scroll, timeValueMillis(between(1, 1000)), Version.fromString("5.0.0")).getEntity();
246249
assertEquals(ContentType.APPLICATION_JSON.toString(), entity.getContentType().getValue());
247250
assertThat(Streams.copyToString(new InputStreamReader(entity.getContent(), StandardCharsets.UTF_8)),
248251
containsString("\"" + scroll + "\""));
@@ -255,7 +258,7 @@ public void testScrollEntity() throws IOException {
255258

256259
public void testClearScroll() throws IOException {
257260
String scroll = randomAlphaOfLength(30);
258-
Request request = clearScroll(scroll, Version.V_5_0_0);
261+
Request request = clearScroll(scroll, Version.fromString("5.0.0"));
259262
assertEquals(ContentType.APPLICATION_JSON.toString(), request.getEntity().getContentType().getValue());
260263
assertThat(Streams.copyToString(new InputStreamReader(request.getEntity().getContent(), StandardCharsets.UTF_8)),
261264
containsString("\"" + scroll + "\""));

0 commit comments

Comments
 (0)