summaryrefslogtreecommitdiff
path: root/jstests/libs
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/libs')
-rw-r--r--jstests/libs/sbe_util.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/jstests/libs/sbe_util.js b/jstests/libs/sbe_util.js
index a47aa3a1130..bb9bdd0d1b7 100644
--- a/jstests/libs/sbe_util.js
+++ b/jstests/libs/sbe_util.js
@@ -8,8 +8,9 @@ load("jstests/libs/fixture_helpers.js"); // For 'isMongos'
/**
* Returns whether or not SBE is enabled for the given connection. Assumes that for repl sets and
* sharded clusters, SBE is either enabled on each node, or disabled on each node.
+ * If 'featureFlags' is non-empty, checks if SBE and all the feature flags are enabled.
*/
-function checkSBEEnabled(theDB) {
+function checkSBEEnabled(theDB, featureFlags = []) {
let checkResult = true;
assert.soon(() => {
@@ -32,6 +33,12 @@ function checkSBEEnabled(theDB) {
continue;
}
+ featureFlags.forEach(function(featureFlag) {
+ const featureFlagParam = conn.adminCommand({getParameter: 1, [featureFlag]: 1});
+ checkResult = checkResult && featureFlagParam.hasOwnProperty(featureFlag) &&
+ featureFlagParam[featureFlag]["value"];
+ });
+
const getParam =
conn.adminCommand({getParameter: 1, internalQueryForceClassicEngine: 1});
if (getParam.hasOwnProperty("internalQueryForceClassicEngine") &&