Skip to content

Commit

Permalink
[BUG] Fix cat.health test failures in pre 1.0.0 mixed cluster test (#928
Browse files Browse the repository at this point in the history
) (#935)

Fixes the cat.health yaml failures when running in a bwc mixed cluster with
legacy (pre 1.0.0) nodes.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
  • Loading branch information
nknize committed Jul 2, 2021
1 parent 23b69e5 commit 34550c5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
"Help":
- skip:
version: " - 7.10.99"
reason: "discovered_master added in OpenSearch 1.0.0"
- do:
cat.health:
help: true
Expand Down Expand Up @@ -27,7 +30,9 @@
---
"Empty cluster":

- skip:
version: " - 7.10.99"
reason: "discovered_master added in OpenSearch 1.0.0"
- do:
cat.health: {}

Expand Down Expand Up @@ -56,7 +61,9 @@
---
"With ts parameter":

- skip:
version: " - 7.10.99"
reason: "discovered_master added in OpenSearch 1.0.0"
- do:
cat.health:
ts: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2013,7 +2013,8 @@ public void testHandshakeUpdatesVersion() throws IOException {
TransportRequestOptions.Type.REG,
TransportRequestOptions.Type.STATE);
try (Transport.Connection connection = serviceA.openConnection(node, builder.build())) {
assertEquals(connection.getVersion(), version);
// OpenSearch 1.0+ in bwc mode should only "upgrade" to Legacy v7.10.2
assertEquals(connection.getVersion(), version.onOrAfter(Version.V_1_0_0) ? LegacyESVersion.V_7_10_2 : version);
}
}
}
Expand Down

0 comments on commit 34550c5

Please sign in to comment.