summaryrefslogtreecommitdiff
path: root/jstests/replsets/cloneDb.js
diff options
context:
space:
mode:
authorWilliam Schultz <william.schultz@mongodb.com>2017-07-14 13:58:43 -0400
committerWilliam Schultz <william.schultz@mongodb.com>2017-07-14 16:13:30 -0400
commit64fb67e843db0287eaf86ca892e8e3f77ca0ca18 (patch)
tree036fb263a0ad22efd99af2867b82d44a310feb37 /jstests/replsets/cloneDb.js
parent9f317c119bef0a66ca1a2ed6617df87b2ed557d4 (diff)
downloadmongo-64fb67e843db0287eaf86ca892e8e3f77ca0ca18.tar.gz
SERVER-30144 cloneDB.js should await replication after creating view
Diffstat (limited to 'jstests/replsets/cloneDb.js')
-rw-r--r--jstests/replsets/cloneDb.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/jstests/replsets/cloneDb.js b/jstests/replsets/cloneDb.js
index 5590dd027f1..c920a6ab28f 100644
--- a/jstests/replsets/cloneDb.js
+++ b/jstests/replsets/cloneDb.js
@@ -43,6 +43,9 @@
jsTest.log("Create view on replica set");
assert.commandWorked(masterDB.runCommand({create: testViewName, viewOn: testColName}));
+ // Make sure all writes have replicated to secondary.
+ replTest.awaitReplication();
+
jsTest.log("Clone db from replica set to standalone server");
standaloneDB.cloneDatabase(replTest.getURL());
assert.eq(numDocs,