summaryrefslogtreecommitdiff
path: root/src/mongo/s/sharding_mongod_test_fixture.cpp
diff options
context:
space:
mode:
authorJudah Schvimer <judah@mongodb.com>2017-04-21 10:27:59 -0400
committerJudah Schvimer <judah@mongodb.com>2017-04-21 10:27:59 -0400
commitac6f185017f76cc7124373e97a2c55291d5c8956 (patch)
tree7fbdfea067a5f43e18942cedb25a8d4fa0410e94 /src/mongo/s/sharding_mongod_test_fixture.cpp
parent1b386fef6773133a17f1fb1f33a254780c47ab04 (diff)
downloadmongo-ac6f185017f76cc7124373e97a2c55291d5c8956.tar.gz
SERVER-27659 Persist Rollback Id
Diffstat (limited to 'src/mongo/s/sharding_mongod_test_fixture.cpp')
-rw-r--r--src/mongo/s/sharding_mongod_test_fixture.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/s/sharding_mongod_test_fixture.cpp b/src/mongo/s/sharding_mongod_test_fixture.cpp
index fe85fdab89b..9cac75212fd 100644
--- a/src/mongo/s/sharding_mongod_test_fixture.cpp
+++ b/src/mongo/s/sharding_mongod_test_fixture.cpp
@@ -48,6 +48,7 @@
#include "mongo/db/repl/repl_settings.h"
#include "mongo/db/repl/replication_coordinator.h"
#include "mongo/db/repl/replication_coordinator_mock.h"
+#include "mongo/db/repl/storage_interface_mock.h"
#include "mongo/db/service_context_noop.h"
#include "mongo/executor/network_interface_mock.h"
#include "mongo/executor/task_executor_pool.h"
@@ -123,6 +124,10 @@ void ShardingMongodTestFixture::setUp() {
repl::ReplicationCoordinator::set(service, std::move(replCoordPtr));
+ auto storagePtr = stdx::make_unique<repl::StorageInterfaceMock>();
+ storagePtr->initializeRollbackID(_opCtx.get());
+ repl::StorageInterface::set(service, std::move(storagePtr));
+
service->setOpObserver(stdx::make_unique<OpObserverImpl>());
repl::setOplogCollectionName();
repl::createOplog(_opCtx.get());