diff options
author | Spencer T Brody <spencer@mongodb.com> | 2015-10-23 11:26:05 -0400 |
---|---|---|
committer | Spencer T Brody <spencer@mongodb.com> | 2015-10-23 15:51:03 -0400 |
commit | 3887f0f51467fe97060bdfdc7e1021d54a73467a (patch) | |
tree | e4054eb8a8305cf4bf85cd6aa2016c2c24e213bf /src/mongo/shell/replsettest.js | |
parent | b314afeac81e704e60743363ba7ab83129d2ba68 (diff) | |
download | mongo-3887f0f51467fe97060bdfdc7e1021d54a73467a.tar.gz |
SERVER-21098 Clean up some sharding jstests to allow them to run under both CSRS and SCCC mode
Diffstat (limited to 'src/mongo/shell/replsettest.js')
-rw-r--r-- | src/mongo/shell/replsettest.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mongo/shell/replsettest.js b/src/mongo/shell/replsettest.js index 360feaceee1..33cf7f87895 100644 --- a/src/mongo/shell/replsettest.js +++ b/src/mongo/shell/replsettest.js @@ -406,6 +406,16 @@ ReplSetTest.prototype.getMaster = function( timeout ) { ReplSetTest.prototype.getPrimary = ReplSetTest.prototype.getMaster +ReplSetTest.prototype.awaitNoPrimary = function(msg, timeout) { + msg = msg || "Timed out waiting for there to be no primary in replset: " + this.name; + timeout = timeout || 30000; + var self = this; + assert.soon(function() { + return self.callIsMaster() == false; + }, msg, timeout); + +} + ReplSetTest.prototype.getSecondaries = function( timeout ){ var master = this.getMaster( timeout ) var secs = [] |