SERVER-89944 Await replication before reading from secondary in capped TTL test (#21612)

GitOrigin-RevId: 07dc84634ef0b253c7672d0a658bde5c34a86e04
This commit is contained in:
Gregory Noma
2024-04-29 18:45:44 -04:00
committed by MongoDB Bot
parent a860809b3f
commit 1c528e87d6

View File

@@ -115,6 +115,7 @@ assert.eq(primaryColl.find().itcount(), 1, "TTL index on timestmap didn't delete
// Try deleting the last one, and verify the secondary replicated this.
assert.commandWorked(primaryColl.deleteOne({}));
rst.awaitReplication();
assert.eq(primaryColl.find().itcount(), 0, "Drop didn't delete");
assert.eq(secondaryColl.find().itcount(), 0, "Drop didn't delete on secondary");