summaryrefslogtreecommitdiff
path: root/jstests/replsets/no_chaining.js
diff options
context:
space:
mode:
authorKristina <kristina@10gen.com>2012-12-04 15:15:15 -0500
committerKristina <kristina@10gen.com>2012-12-05 11:12:04 -0500
commitc2afb4fa22cd6052f843ca4469e53027a36020cd (patch)
treed640325048859e382f74af7388d580bcee2918f0 /jstests/replsets/no_chaining.js
parent6c4280c84d4efcef88945c98c3f5d0bc1eef3b38 (diff)
downloadmongo-c2afb4fa22cd6052f843ca4469e53027a36020cd.tar.gz
SERVER-7817 Display chainingAllowed option when set to false
Diffstat (limited to 'jstests/replsets/no_chaining.js')
-rw-r--r--jstests/replsets/no_chaining.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/jstests/replsets/no_chaining.js b/jstests/replsets/no_chaining.js
index c937dbed1eb..6fc556a518c 100644
--- a/jstests/replsets/no_chaining.js
+++ b/jstests/replsets/no_chaining.js
@@ -39,7 +39,7 @@ var checkNoChaining = function() {
}
);
- var endTime = (new Date()).getTime()+10;
+ var endTime = (new Date()).getTime()+10000;
while ((new Date()).getTime() < endTime) {
assert(nodes[2].getDB("test").foo.findOne() == null,
'Check that 2 does not catch up');
@@ -49,7 +49,9 @@ var checkNoChaining = function() {
var forceSync = function() {
assert.soon(
function() {
- nodes[2].getDB("admin").runCommand({replSetSyncFrom : hostnames[1]});
+ var config = nodes[2].getDB("local").system.replset.findOne();
+ var targetHost = config.members[1].host;
+ printjson(nodes[2].getDB("admin").runCommand({replSetSyncFrom : targetHost}));
return nodes[2].getDB("test").foo.findOne() != null;
},
'Check force sync still works'
@@ -65,4 +67,7 @@ if (!_isWindows()) {
print("check that forcing sync target still works");
forceSync();
+
+ var config = master.getDB("local").system.replset.findOne();
+ assert.eq(false, config.settings.chainingAllowed, tojson(config));
}