Skip to content

Commit 81dbbfb

Browse files
committed
[BUG] Fix cat.health test failures in pre 1.0.0 mixed cluster test (#928)
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 <[email protected]>
1 parent 3c563fe commit 81dbbfb

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

rest-api-spec/src/main/resources/rest-api-spec/test/cat.health/10_basic.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
"Help":
3+
- skip:
4+
version: " - 7.10.99"
5+
reason: "discovered_master added in OpenSearch 1.0.0"
36
- do:
47
cat.health:
58
help: true
@@ -27,7 +30,9 @@
2730
2831
---
2932
"Empty cluster":
30-
33+
- skip:
34+
version: " - 7.10.99"
35+
reason: "discovered_master added in OpenSearch 1.0.0"
3136
- do:
3237
cat.health: {}
3338

@@ -56,7 +61,9 @@
5661
5762
---
5863
"With ts parameter":
59-
64+
- skip:
65+
version: " - 7.10.99"
66+
reason: "discovered_master added in OpenSearch 1.0.0"
6067
- do:
6168
cat.health:
6269
ts: false

test/framework/src/main/java/org/opensearch/transport/AbstractSimpleTransportTestCase.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -2013,7 +2013,8 @@ public void testHandshakeUpdatesVersion() throws IOException {
20132013
TransportRequestOptions.Type.REG,
20142014
TransportRequestOptions.Type.STATE);
20152015
try (Transport.Connection connection = serviceA.openConnection(node, builder.build())) {
2016-
assertEquals(connection.getVersion(), version);
2016+
// OpenSearch 1.0+ in bwc mode should only "upgrade" to Legacy v7.10.2
2017+
assertEquals(connection.getVersion(), version.onOrAfter(Version.V_1_0_0) ? LegacyESVersion.V_7_10_2 : version);
20172018
}
20182019
}
20192020
}

0 commit comments

Comments
 (0)