diff options
Diffstat (limited to 'jstests/replsets/rslib.js')
-rw-r--r-- | jstests/replsets/rslib.js | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/jstests/replsets/rslib.js b/jstests/replsets/rslib.js index 2a3be9ba208..ecaf21e5d46 100644 --- a/jstests/replsets/rslib.js +++ b/jstests/replsets/rslib.js @@ -306,17 +306,10 @@ var getLastOpTime; * @param options - The options passed to {@link ReplSetTest.startSet} */ startSetIfSupportsReadMajority = function(replSetTest, options) { - try { - replSetTest.startSet(options); - } catch (e) { - var conn = MongoRunner.runMongod(); - if (!conn.getDB("admin").serverStatus().storageEngine.supportsCommittedReads) { - MongoRunner.stopMongod(conn); - return false; - } - throw e; - } - return true; + replSetTest.startSet(options); + return replSetTest.nodes[0] + .adminCommand("serverStatus") + .storageEngine.supportsCommittedReads; }; /** |