diff options
author | Dianna Hohensee <dianna.hohensee@mongodb.com> | 2021-08-09 13:49:32 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-08-10 19:08:45 +0000 |
commit | bf27cb4bd5b353c81299438ffd4c3d19c176e400 (patch) | |
tree | e1ce635fe774b10eb39232a492286753729242cd /src/mongo/db/commands/mr_test.cpp | |
parent | 0ce373d5569c954653a0a50e7002b362966f87e7 (diff) | |
download | mongo-bf27cb4bd5b353c81299438ffd4c3d19c176e400.tar.gz |
SERVER-57194 Fix unit-tests to run with lock-free reads enabled
Diffstat (limited to 'src/mongo/db/commands/mr_test.cpp')
-rw-r--r-- | src/mongo/db/commands/mr_test.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mongo/db/commands/mr_test.cpp b/src/mongo/db/commands/mr_test.cpp index 5754556fb9c..9c0854ace43 100644 --- a/src/mongo/db/commands/mr_test.cpp +++ b/src/mongo/db/commands/mr_test.cpp @@ -26,6 +26,9 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ + +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + #include <functional> #include <memory> #include <string> @@ -48,6 +51,7 @@ #include "mongo/db/repl/replication_coordinator_mock.h" #include "mongo/db/repl/storage_interface_impl.h" #include "mongo/db/service_context_d_test_fixture.h" +#include "mongo/logv2/log.h" #include "mongo/rpc/factory.h" #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/scripting/dbdirectclient_factory.h" @@ -521,12 +525,6 @@ TEST_F(MapReduceCommandTest, PrimaryStepDownPreventsTemporaryCollectionDrops) { } TEST_F(MapReduceCommandTest, ReplacingExistingOutputCollectionPreservesIndexes) { - // TODO (SERVER-57194): enable lock-free reads. - bool disableLockFreeReadsOriginalValue = storageGlobalParams.disableLockFreeReads; - storageGlobalParams.disableLockFreeReads = true; - ON_BLOCK_EXIT( - [&] { storageGlobalParams.disableLockFreeReads = disableLockFreeReadsOriginalValue; }); - CollectionOptions options; options.uuid = UUID::gen(); ASSERT_OK(_storage.createCollection(_opCtx.get(), outputNss, options)); |