diff options
Diffstat (limited to 'jstests/libs')
-rw-r--r-- | jstests/libs/read_write_concern_defaults_propagation_common.js | 6 | ||||
-rw-r--r-- | jstests/libs/write_concern_util.js | 13 |
2 files changed, 2 insertions, 17 deletions
diff --git a/jstests/libs/read_write_concern_defaults_propagation_common.js b/jstests/libs/read_write_concern_defaults_propagation_common.js index b992593e9fc..8bf732466b0 100644 --- a/jstests/libs/read_write_concern_defaults_propagation_common.js +++ b/jstests/libs/read_write_concern_defaults_propagation_common.js @@ -1,8 +1,7 @@ var ReadWriteConcernDefaultsPropagation = (function() { "use strict"; - load("jstests/libs/write_concern_util.js"); // For isDefaultWriteConcernMajorityFlagEnabled. - load('jstests/replsets/rslib.js'); // For isDefaultReadConcernLocalFlagEnabled. + load('jstests/replsets/rslib.js'); // For isDefaultReadConcernLocalFlagEnabled. const kDefaultReadConcernField = "defaultReadConcern"; const kDefaultWriteConcernField = "defaultWriteConcern"; @@ -140,8 +139,7 @@ var ReadWriteConcernDefaultsPropagation = (function() { // Note localUpdateWallClockTime is generated by the in-memory cache, so it will be // present even if there are no defaults. const unexpectedFields = kDefaultRWCFields.concat(kExtraSetFields).filter(field => { - return (!isDefaultWriteConcernMajorityFlagEnabled(checkConn) || - field !== kDefaultWriteConcernField) && + return (field !== kDefaultWriteConcernField) && (!isDefaultReadConcernLocalFlagEnabled(checkConn) || field !== kDefaultReadConcernField); }); diff --git a/jstests/libs/write_concern_util.js b/jstests/libs/write_concern_util.js index 80c6593507a..fff2517c754 100644 --- a/jstests/libs/write_concern_util.js +++ b/jstests/libs/write_concern_util.js @@ -154,17 +154,4 @@ function runWriteConcernRetryabilityTest(priConn, secConn, cmd, kNodes, dbName, checkWriteConcernTimedOut(testDB2.runCommand(cmd)); restartServerReplication(secConn); -} - -// Check if featureFlagDefaultWriteConcernMajority is enabled. -function isDefaultWriteConcernMajorityFlagEnabled(conn) { - let res = conn.adminCommand({getParameter: 1, featureFlagDefaultWriteConcernMajority: 1}); - if (!res.ok) { - // Running with old version which doesn't have the flag. - if (res.errmsg == "no option found to get") - return false; - assert(false); - } - - return res.featureFlagDefaultWriteConcernMajority.value; }
\ No newline at end of file |