Skip to content

Commit 74c1671

Browse files
committed
Skip shard routing tests on OpenSearch < 2.2.0 with security
OpenSearch < 2.2.0 with the security plugin throws java.io.OptionalDataException on shard-routed requests due to non-thread-safe HashSet/HashMap in User serialization. Fixed in 2.2.0 by opensearch-project/security#1970 (50a94b47). Widen the existing 2.1.0-only skip to cover all versions below 2.2.0. Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
1 parent 9cb9fbc commit 74c1671

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

opensearchtransport/shard_routing_integration_test.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,12 @@ func (s *ShardRoutingSuite) SetupSuite() {
7878
testutil.WaitForCluster(t)
7979
testutil.RequireMinNodes(t, 2) // 1 replica requires at least 2 nodes for green health
8080

81-
// OpenSearch 2.1.0 with the security plugin returns HTTP 500 on search
82-
// requests routed to specific shard-hosting nodes.
81+
// OpenSearch < 2.2.0 with the security plugin returns HTTP 500 on
82+
// shard-routed requests due to non-thread-safe User serialization
83+
// (java.io.OptionalDataException). Fixed in 2.2.0 by
84+
// opensearch-project/security#1970 (50a94b47).
8385
if testutil.IsSecure(t) {
84-
testutil.SkipIfVersion(t, "=", "2.1.0", "shard-exact pipeline (security plugin HTTP 500)")
86+
testutil.SkipIfVersion(t, "<", "2.2.0", "shard-exact pipeline (security plugin OptionalDataException)")
8587
}
8688

8789
s.ctx, s.cancel = context.WithTimeout(t.Context(), 120*time.Second)

0 commit comments

Comments
 (0)