summaryrefslogtreecommitdiff
path: root/jstests/replsets/chaining_removal.js
diff options
context:
space:
mode:
authormatt dannenberg <matt.dannenberg@10gen.com>2015-05-22 10:17:26 -0400
committermatt dannenberg <matt.dannenberg@10gen.com>2015-08-05 04:17:46 -0400
commit197ea2a625dc04d95a7ad4933283b5f02ca2ad9e (patch)
tree1461ec1f1bb40d010f79fb727b753cf227952ac1 /jstests/replsets/chaining_removal.js
parentd56b18054ae884c979135c34ba698e052b66d6c2 (diff)
downloadmongo-197ea2a625dc04d95a7ad4933283b5f02ca2ad9e.tar.gz
SERVER-18584 write an n-op when transition to primary is complete
Diffstat (limited to 'jstests/replsets/chaining_removal.js')
-rw-r--r--jstests/replsets/chaining_removal.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/jstests/replsets/chaining_removal.js b/jstests/replsets/chaining_removal.js
index 2175c8d72cd..76f8a6b4338 100644
--- a/jstests/replsets/chaining_removal.js
+++ b/jstests/replsets/chaining_removal.js
@@ -20,11 +20,15 @@
});
var primary = replTest.getPrimary();
// force node 4 to chain through node 1
+ replTest.awaitReplication();
assert.commandWorked(nodes[4].getDB("admin").runCommand({"replSetSyncFrom": nodes[1].host}));
+ assert.commandWorked(nodes[1].getDB("admin").runCommand({"replSetSyncFrom": nodes[0].host}));
var res;
+ var res2;
assert.soon(function() {
res = nodes[4].getDB("admin").runCommand({"replSetGetStatus": 1});
- return res.syncingTo === nodes[1].host;
+ res2 = nodes[1].getDB("admin").runCommand({"replSetGetStatus": 1});
+ return res.syncingTo === nodes[1].host && res2.syncingTo === nodes[0].host;
}, "node 4 failed to start chaining: "+ tojson(res));
// write that should reach all nodes
@@ -46,6 +50,7 @@
// ensure writing to all four nodes still works
primary = replTest.getPrimary();
+ replTest.awaitReplication();
options.writeConcern.w = 4;
assert.writeOK(primary.getDB(name).foo.insert({x: 2}, options));