Skip to content

Commit 87e49d7

Browse files
committed
fixup! Skip shard routing tests on OpenSearch < 2.2.0 with security (opensearch-project#819)
Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
1 parent 0741cc1 commit 87e49d7

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

opensearchtransport/shard_routing_integration_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ import (
3333
func TestMurmur3ShardRouting_Integration(t *testing.T) {
3434
testutil.WaitForCluster(t)
3535

36+
// Shard routing verification requires routing_num_shards from
37+
// _cluster/state/metadata, which was introduced in OpenSearch 2.0.
38+
testutil.SkipIfVersion(t, "<", "2.0", "murmur3 shard routing (routing_num_shards unavailable)")
39+
3640
// OpenSearch < 2.2.0 with the security plugin has a non-thread-safe User
3741
// serialization race (java.io.OptionalDataException) during inter-node
3842
// transport. Fixed in 2.2.0 by opensearch-project/security#1970.
@@ -254,6 +258,10 @@ func TestShardExactRouting_FullPipeline_Integration(t *testing.T) {
254258
testutil.WaitForCluster(t)
255259
testutil.SkipIfSingleNode(t, 2) // 1 replica requires at least 2 nodes for green health
256260

261+
// Shard-exact routing requires routing_num_shards from _cluster/state/metadata,
262+
// which was introduced in OpenSearch 2.0.
263+
testutil.SkipIfVersion(t, "<", "2.0", "shard-exact routing (routing_num_shards unavailable)")
264+
257265
// OpenSearch < 2.2.0 with the security plugin returns HTTP 500 on
258266
// shard-routed requests due to non-thread-safe User serialization
259267
// (java.io.OptionalDataException). Fixed in 2.2.0 by

0 commit comments

Comments
 (0)