From e8d5600a35b0c691e6e9fd2664a08e3639e4b271 Mon Sep 17 00:00:00 2001 From: Gaurav Chandani Date: Fri, 12 Apr 2024 12:54:12 +0530 Subject: [PATCH] Fixed GatewayAllocatorTests Signed-off-by: Gaurav Chandani --- .../java/org/opensearch/gateway/GatewayAllocatorTests.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/test/java/org/opensearch/gateway/GatewayAllocatorTests.java b/server/src/test/java/org/opensearch/gateway/GatewayAllocatorTests.java index 604a5e62192c2..bb59a5792ec8c 100644 --- a/server/src/test/java/org/opensearch/gateway/GatewayAllocatorTests.java +++ b/server/src/test/java/org/opensearch/gateway/GatewayAllocatorTests.java @@ -122,7 +122,7 @@ public void testCorrectnessOfBatch() { .values() .stream() .map(ShardsBatchGatewayAllocator.ShardsBatch::getBatchedShardRoutings) - .flatMap(Set::stream) + .flatMap(List::stream) .collect(Collectors.toSet()); primariesInAllBatches.forEach(shardRouting -> assertTrue(shardRouting.unassigned() && shardRouting.primary() == true)); @@ -130,7 +130,7 @@ public void testCorrectnessOfBatch() { .values() .stream() .map(ShardsBatchGatewayAllocator.ShardsBatch::getBatchedShardRoutings) - .flatMap(Set::stream) + .flatMap(List::stream) .collect(Collectors.toSet()); replicasInAllBatches.forEach(shardRouting -> assertTrue(shardRouting.unassigned() && shardRouting.primary() == false));