Skip to content

Commit

Permalink
changes to test
Browse files Browse the repository at this point in the history
Signed-off-by: Poojita Raj <[email protected]>
  • Loading branch information
Poojita-Raj committed Nov 4, 2022
1 parent 80ef959 commit 1b9790c
Showing 1 changed file with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public void testIndexReopenClose() throws Exception {
client().prepareIndex(INDEX_NAME).setId("1").setSource("foo", "bar").setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE).get();
refresh(INDEX_NAME);

final int initialDocCount = scaledRandomIntBetween(10000, 200000);
final int initialDocCount = scaledRandomIntBetween(100, 200);
try (
BackgroundIndexer indexer = new BackgroundIndexer(
INDEX_NAME,
Expand All @@ -259,20 +259,13 @@ public void testIndexReopenClose() throws Exception {
) {
indexer.start(initialDocCount);
waitForDocs(initialDocCount, indexer);
refresh(INDEX_NAME);
flush(INDEX_NAME);
waitForReplicaUpdate();
}

flushAndRefresh(INDEX_NAME);
waitForReplicaUpdate();

logger.info("--> Closing the index ");
client().admin().indices().prepareClose(INDEX_NAME).get();

// Add another node to kick off TransportNodesListGatewayStartedShards which fetches latestReplicationCheckpoint for SegRep enabled
// indices
final String replica2 = internalCluster().startNode();

logger.info("--> Opening the index");
client().admin().indices().prepareOpen(INDEX_NAME).get();
}
Expand Down

0 comments on commit 1b9790c

Please sign in to comment.