Skip to content

Commit c29a7c1

Browse files
committed
Fix Flaky Test org.opensearch.gateway.RecoveryFromGatewayIT.testShardStoreFetchMultiNodeMultiIndexesUsingBatchAction
Signed-off-by: kkewwei <[email protected]>
1 parent dc78714 commit c29a7c1

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

server/src/internalClusterTest/java/org/opensearch/gateway/RecoveryFromGatewayIT.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1382,7 +1382,6 @@ public void testShardStoreFetchMultiNodeMultiIndexesUsingBatchAction() throws Ex
13821382
String indexName1 = "test1";
13831383
String indexName2 = "test2";
13841384
DiscoveryNode[] nodes = getDiscoveryNodes();
1385-
System.out.println();
13861385
TransportNodesListShardStoreMetadataBatch.NodesStoreFilesMetadataBatch response = prepareAndSendRequest(
13871386
new String[] { indexName1, indexName2 },
13881387
nodes
@@ -1393,7 +1392,6 @@ public void testShardStoreFetchMultiNodeMultiIndexesUsingBatchAction() throws Ex
13931392
ShardRouting[] shardRoutings = clusterSearchShardsGroup.getShards();
13941393
assertEquals(2, shardRoutings.length);
13951394
for (ShardRouting shardRouting : shardRoutings) {
1396-
System.out.println("----------------" + shardRouting.shortSummary());
13971395
TransportNodesListShardStoreMetadataBatch.NodeStoreFilesMetadata nodeStoreFilesMetadata = response.getNodesMap()
13981396
.get(shardRouting.currentNodeId())
13991397
.getNodeStoreFilesMetadataBatch()
@@ -1511,6 +1509,7 @@ private void prepareIndices(String[] indices, int numberOfPrimaryShards, int num
15111509
index(index, "type", "1", Collections.emptyMap());
15121510
flush(index);
15131511
}
1512+
ensureGreen(indices);
15141513
}
15151514

15161515
private TransportNodesListShardStoreMetadataBatch.NodesStoreFilesMetadataBatch prepareAndSendRequest(
@@ -1534,11 +1533,8 @@ private void assertNodeStoreFilesMetadataSuccessCase(
15341533
assertNull(nodeStoreFilesMetadata.getStoreFileFetchException());
15351534
TransportNodesListShardStoreMetadataHelper.StoreFilesMetadata storeFileMetadata = nodeStoreFilesMetadata.storeFilesMetadata();
15361535
assertFalse(storeFileMetadata.isEmpty());
1537-
System.out.println("----------" + storeFileMetadata);
15381536
assertEquals(shardId, storeFileMetadata.shardId());
15391537
assertNotNull(storeFileMetadata.peerRecoveryRetentionLeases());
1540-
System.out.println("----------" + storeFileMetadata.peerRecoveryRetentionLeases());
1541-
15421538
}
15431539

15441540
private void assertNodeGatewayStartedShardsHappyCase(GatewayStartedShard gatewayStartedShard) {

0 commit comments

Comments
 (0)