summaryrefslogtreecommitdiff
path: root/jstests/sharding/split_stale_mongos.js
diff options
context:
space:
mode:
authorSpencer T Brody <spencer@mongodb.com>2016-04-25 15:34:43 -0400
committerSpencer T Brody <spencer@mongodb.com>2016-04-25 17:48:29 -0400
commitd30ab0aa759d75cabc0a88ea5f2fd2b9c1a6c9a8 (patch)
tree50ba57498a8ec7fec5a27e929c9cc01f8bdb321e /jstests/sharding/split_stale_mongos.js
parent046441de98dd72689397a4a06f8a68ef58a4c226 (diff)
downloadmongo-d30ab0aa759d75cabc0a88ea5f2fd2b9c1a6c9a8.tar.gz
SERVER-23915 Make split_stale_mongos.js wait for split to propagate to all config servers
Diffstat (limited to 'jstests/sharding/split_stale_mongos.js')
-rw-r--r--jstests/sharding/split_stale_mongos.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/jstests/sharding/split_stale_mongos.js b/jstests/sharding/split_stale_mongos.js
index e40112f0cd0..ddfe820c05c 100644
--- a/jstests/sharding/split_stale_mongos.js
+++ b/jstests/sharding/split_stale_mongos.js
@@ -12,7 +12,9 @@ assert.commandWorked(admin.runCommand({shardCollection: testNs, key: {_id: 1}}))
for (var i = 0; i < 100; i += 10) {
assert.commandWorked(st.s0.getDB('admin').runCommand({split: testNs, middle: {_id: i}}));
+ st.configRS.awaitLastOpCommitted(); // Ensure that other mongos sees the previous split
assert.commandWorked(st.s1.getDB('admin').runCommand({split: testNs, middle: {_id: i + 5}}));
+ st.configRS.awaitLastOpCommitted(); // Ensure that other mongos sees the previous split
}
st.stop(); \ No newline at end of file