diff options
author | matt dannenberg <matt.dannenberg@10gen.com> | 2013-07-29 13:59:46 -0400 |
---|---|---|
committer | matt dannenberg <matt.dannenberg@10gen.com> | 2013-07-29 14:01:48 -0400 |
commit | 95407950b51f17a116dc87909a85df603d8def78 (patch) | |
tree | c9cd3c8157d936b3f69346f31d25eaf04b9a3abf | |
parent | 761a59942350db8523bddc105ac5509c8aac18d0 (diff) | |
download | mongo-95407950b51f17a116dc87909a85df603d8def78.tar.gz |
buildbot fix
awaitReplication now waits for config numbers as well as optime to be synchronize before proceeding
(in some tests we were awaiting replication after a config change, which didn't make sense)
-rw-r--r-- | src/mongo/shell/replsettest.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mongo/shell/replsettest.js b/src/mongo/shell/replsettest.js index 6b670fb1644..ea88e9cebb5 100644 --- a/src/mongo/shell/replsettest.js +++ b/src/mongo/shell/replsettest.js @@ -528,6 +528,8 @@ ReplSetTest.prototype.awaitReplication = function(timeout) { print("ReplSetTest awaitReplication: starting: timestamp for primary, " + name + ", is " + tojson(this.latest)); + var configVersion = this.liveNodes.master.getDB("local")['system.replset'].findOne().version; + var self = this; assert.soon( function() { try { @@ -583,6 +585,15 @@ ReplSetTest.prototype.awaitReplication = function(timeout) { secondaryCount + ", " + name + ", to have an oplog built"); return false; } + + var slaveConfigVersion = slave.getDB("local")['system.replset'].findOne().version; + + if (configVersion != slaveConfigVersion) { + print("ReplSetTest awaitReplication: secondary #" + secondaryCount + + ", " + name + ", has config version #" + slaveConfigVersion + + ", but expected config version #" + configVersion); + return false; + } } print("ReplSetTest awaitReplication: finished: all " + secondaryCount + |