Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flaky test SegmentReplicationWithRemoteStorePressureIT.testAddReplicaWhileWritesBlocked #9501

Merged
merged 1 commit into from
Aug 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ public void testWritesRejected() throws Exception {
* This test ensures that a replica can be added while the index is under write block.
* Ensuring that only write requests are blocked.
*/
@AwaitsFix(bugUrl = "https://github.com/opensearch-project/OpenSearch/issues/8887")
public void testAddReplicaWhileWritesBlocked() throws Exception {
final String primaryNode = internalCluster().startNode();
createIndex(INDEX_NAME);
Expand Down Expand Up @@ -176,10 +175,10 @@ public void testAddReplicaWhileWritesBlocked() throws Exception {
.prepareUpdateSettings(INDEX_NAME)
.setSettings(Settings.builder().put(SETTING_NUMBER_OF_REPLICAS, 2))
);
ensureGreen(INDEX_NAME);
replicaNodes.add(replica_2);
waitForSearchableDocs(totalDocs.get(), replica_2);
}
ensureGreen(INDEX_NAME);
waitForSearchableDocs(totalDocs.get(), replicaNodes);
refresh(INDEX_NAME);
// wait for the replicas to catch up after block is released.
assertReplicaCheckpointUpdated(primaryShard);
Expand Down Expand Up @@ -347,7 +346,7 @@ private BulkResponse executeBulkRequest(List<String> nodes, int docsPerBatch) {
private int indexUntilCheckpointCount() {
int total = 0;
for (int i = 0; i < MAX_CHECKPOINTS_BEHIND; i++) {
final int numDocs = randomIntBetween(1, 100);
final int numDocs = randomIntBetween(1, 5);
for (int j = 0; j < numDocs; ++j) {
indexDoc();
}
Expand Down
Loading