summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEsha Maharishi <esha.maharishi@mongodb.com>2018-11-05 12:37:52 -0500
committerEsha Maharishi <esha.maharishi@mongodb.com>2018-11-15 23:20:19 -0500
commitc59376d6ced1b1d90f057238158b9503e3a836be (patch)
tree58523d5a691818b6bdca22f56a14c0b062cada5e
parent1364f098212438d22ecec58172df6cfe70fe1eb9 (diff)
downloadmongo-c59376d6ced1b1d90f057238158b9503e3a836be.tar.gz
SERVER-37913 coll_epoch_test1.js does not wait for the config server to replicate after dropping collections
(cherry picked from commit 53cfb9e570e831e1388d0b9e24129d6f618ceded)
-rw-r--r--jstests/sharding/coll_epoch_test1.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/jstests/sharding/coll_epoch_test1.js b/jstests/sharding/coll_epoch_test1.js
index 2203bed6641..3ffb3f16e82 100644
--- a/jstests/sharding/coll_epoch_test1.js
+++ b/jstests/sharding/coll_epoch_test1.js
@@ -38,6 +38,7 @@
assert.eq(100, staleMongos.getCollection(coll + "").find({test: "a"}).itcount());
assert(coll.drop());
+ st.configRS.awaitLastOpCommitted();
//
// Test that inserts and queries go to the correct shard even when the collection has been
@@ -49,6 +50,7 @@
st.ensurePrimaryShard(coll.getDB().getName(), st.shard1.shardName);
assert.commandWorked(coll.ensureIndex({notId: 1}));
assert.commandWorked(admin.runCommand({shardCollection: coll + "", key: {notId: 1}}));
+ st.configRS.awaitLastOpCommitted();
bulk = insertMongos.getCollection(coll + "").initializeUnorderedBulkOp();
for (var i = 0; i < 100; i++) {
@@ -59,6 +61,7 @@
assert.eq(0, staleMongos.getCollection(coll + "").find({test: {$in: ["a"]}}).itcount());
assert(coll.drop());
+ st.configRS.awaitLastOpCommitted();
//
// Test that inserts and queries go to the correct shard even when the collection has been
@@ -77,6 +80,7 @@
assert.eq(0, staleMongos.getCollection(coll + "").find({test: {$in: ["a", "b"]}}).itcount());
assert(coll.drop());
+ st.configRS.awaitLastOpCommitted();
//
// Test that inserts and queries go to correct shard even when the collection has been unsharded