diff options
author | Daniel Gottlieb <daniel.gottlieb@mongodb.com> | 2017-10-20 15:01:53 -0400 |
---|---|---|
committer | Daniel Gottlieb <daniel.gottlieb@mongodb.com> | 2017-10-20 21:47:10 -0400 |
commit | 367d31e1da549c460ae710a8cc280f4c235ab24f (patch) | |
tree | e5bab44a1e565e9d349d4da72182d9883c71eebc /jstests/replsets/last_op_visible.js | |
parent | 3944af0d50504ff254330aaeb15eae955ffdb91b (diff) | |
download | mongo-367d31e1da549c460ae710a8cc280f4c235ab24f.tar.gz |
SERVER-31350: Make enableMajorityReadConcern a noop
Diffstat (limited to 'jstests/replsets/last_op_visible.js')
-rw-r--r-- | jstests/replsets/last_op_visible.js | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/jstests/replsets/last_op_visible.js b/jstests/replsets/last_op_visible.js index 20176e8737a..f5a50596ea4 100644 --- a/jstests/replsets/last_op_visible.js +++ b/jstests/replsets/last_op_visible.js @@ -4,6 +4,8 @@ // We then confirm that a writeConcern majority write will be seen as the lastVisibleOp by a // majority read. +load("jstests/replsets/rslib.js"); + (function() { "use strict"; @@ -11,18 +13,10 @@ var replTest = new ReplSetTest( {name: name, nodes: 3, nodeOptions: {enableMajorityReadConcern: ''}, waitForKeys: true}); - try { - replTest.startSet(); - } catch (e) { - var conn = MongoRunner.runMongod(); - if (!conn.getDB('admin').serverStatus().storageEngine.supportsCommittedReads) { - print("Skipping read_majority.js since storageEngine doesn't support it."); - MongoRunner.stopMongod(conn); - return; - } - throw e; + if (!startSetIfSupportsReadMajority(replTest)) { + jsTestLog("Skipping test since storage engine doesn't support majority read concern."); + return; } - replTest.initiate(); var primary = replTest.getPrimary(); |