summaryrefslogtreecommitdiff
path: root/src/mongo/db/catalog/index_spec_validate_test.cpp
diff options
context:
space:
mode:
authorIan Boros <ian.boros@10gen.com>2018-07-27 16:08:02 -0400
committerIan Boros <ian.boros@10gen.com>2018-07-27 18:22:18 -0400
commitbaecc1ad1893c1502f316cc18d2439fb225d9dcd (patch)
treee5fdab44b39fdcca3d2a7e76671c2eff636591e2 /src/mongo/db/catalog/index_spec_validate_test.cpp
parentb42420caf1018835da58ace37b51099931b904c0 (diff)
downloadmongo-baecc1ad1893c1502f316cc18d2439fb225d9dcd.tar.gz
SERVER-36199 Put allPaths index creation behind a query knob
Diffstat (limited to 'src/mongo/db/catalog/index_spec_validate_test.cpp')
-rw-r--r--src/mongo/db/catalog/index_spec_validate_test.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/catalog/index_spec_validate_test.cpp b/src/mongo/db/catalog/index_spec_validate_test.cpp
index e49d09eb675..35dfc7adbe9 100644
--- a/src/mongo/db/catalog/index_spec_validate_test.cpp
+++ b/src/mongo/db/catalog/index_spec_validate_test.cpp
@@ -40,6 +40,7 @@
#include "mongo/db/commands/test_commands_enabled.h"
#include "mongo/db/namespace_string.h"
#include "mongo/db/query/collation/collator_interface_mock.h"
+#include "mongo/db/query/query_knobs.h"
#include "mongo/db/query/query_test_service_context.h"
#include "mongo/db/server_options.h"
#include "mongo/unittest/unittest.h"
@@ -67,15 +68,21 @@ public:
// TODO: Remove test command enabling/disabling in SERVER-36198
_prevEnabled = getTestCommandsEnabled();
setTestCommandsEnabled(true);
+
+ // TODO: Remove knob enabling/disabling in SERVER-36198.
+ _prevKnobEnabled = internalQueryAllowAllPathsIndexes.load();
+ internalQueryAllowAllPathsIndexes.store(true);
}
~TestCommandFcvGuard() {
serverGlobalParams.featureCompatibility.setVersion(_prevVersion);
setTestCommandsEnabled(_prevEnabled);
+ internalQueryAllowAllPathsIndexes.store(_prevKnobEnabled);
}
private:
bool _prevEnabled;
+ bool _prevKnobEnabled;
ServerGlobalParams::FeatureCompatibility::Version _prevVersion;
};