Skip to content

Commit b3adf2b

Browse files
authored
Enable bwc tests after #67414 merge (#67430)
1 parent d7761bf commit b3adf2b

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ tasks.register("verifyVersions") {
175175
* after the backport of the backcompat code is complete.
176176
*/
177177

178-
boolean bwc_tests_enabled = false
179-
String bwc_tests_disabled_issue = "https://github.com/elastic/elasticsearch/pull/67414" /* place a PR link here when committing bwc changes */
178+
boolean bwc_tests_enabled = true
179+
String bwc_tests_disabled_issue = "" /* place a PR link here when committing bwc changes */
180180
/*
181181
* FIPS 140-2 behavior was fixed in 7.11.0. Before that there is no way to run elasticsearch in a
182182
* JVM that is properly configured to be in fips mode with BCFIPS. For now we need to disable

qa/mixed-cluster/src/test/java/org/elasticsearch/backwards/SearchWithMinCompatibleSearchNodeIT.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,9 @@ public void testCcsMinimizeRoundtripsIsFalse() throws Exception {
120120
try (RestClient client = buildClient(restClientSettings(),
121121
allNodes.stream().map(Node::getPublishAddress).toArray(HttpHost[]::new))) {
122122
Version version = randomBoolean() ? newVersion : bwcVersion;
123-
boolean shouldSetCcsMinimizeRoundtrips = randomBoolean();
124123

125-
Request request = new Request("POST", index + "/_search?min_compatible_shard_node=" + version +
126-
(shouldSetCcsMinimizeRoundtrips ? "&ccs_minimize_roundtrips=true" : ""));
124+
Request request = new Request("POST", index + "/_search?min_compatible_shard_node=" + version
125+
+ "&ccs_minimize_roundtrips=true");
127126
assertBusy(() -> {
128127
assertWithBwcVersionCheck(() -> {
129128
ResponseException responseException = expectThrows(ResponseException.class, () -> client.performRequest(request));
@@ -139,7 +138,7 @@ public void testCcsMinimizeRoundtripsIsFalse() throws Exception {
139138
}
140139

141140
private void assertWithBwcVersionCheck(CheckedRunnable<Exception> code, RestClient client, Request request) throws Exception {
142-
if (bwcVersion.before(Version.V_8_0_0)) {
141+
if (bwcVersion.before(Version.V_7_12_0)) {
143142
// min_compatible_shard_node support doesn't exist in older versions and there will be an "unrecognized parameter" exception
144143
ResponseException exception = expectThrows(ResponseException.class, () -> client.performRequest(request));
145144
assertThat(exception.getResponse().getStatusLine().getStatusCode(),

server/src/main/java/org/elasticsearch/ElasticsearchException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,7 @@ private enum ElasticsearchExceptionHandle {
10521052
org.elasticsearch.action.search.VersionMismatchException.class,
10531053
org.elasticsearch.action.search.VersionMismatchException::new,
10541054
161,
1055-
Version.V_8_0_0);
1055+
Version.V_7_12_0);
10561056

10571057
final Class<? extends ElasticsearchException> exceptionClass;
10581058
final CheckedFunction<StreamInput, ? extends ElasticsearchException, IOException> constructor;

server/src/main/java/org/elasticsearch/action/search/SearchRequest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ public SearchRequest(StreamInput in) throws IOException {
231231
finalReduce = true;
232232
}
233233
ccsMinimizeRoundtrips = in.readBoolean();
234-
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
234+
if (in.getVersion().onOrAfter(Version.V_7_12_0)) {
235235
if (in.readBoolean()) {
236236
minCompatibleShardNode = Version.readVersion(in);
237237
}
@@ -263,7 +263,7 @@ public void writeTo(StreamOutput out) throws IOException {
263263
out.writeBoolean(finalReduce);
264264
}
265265
out.writeBoolean(ccsMinimizeRoundtrips);
266-
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
266+
if (out.getVersion().onOrAfter(Version.V_7_12_0)) {
267267
out.writeBoolean(minCompatibleShardNode != null);
268268
if (minCompatibleShardNode != null) {
269269
Version.writeVersion(minCompatibleShardNode, out);

0 commit comments

Comments
 (0)