summaryrefslogtreecommitdiff
path: root/src/mongo/s/sharding_mongod_test_fixture.cpp
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2017-04-28 12:18:56 -0400
committerBenety Goh <benety@mongodb.com>2017-04-28 19:52:32 -0400
commitce76085e2464c38119b307851d4c63687d9a581f (patch)
treed466426f7ac2478ac491c2b11a9b2b54815cf754 /src/mongo/s/sharding_mongod_test_fixture.cpp
parent7358c66cbf77203fa0803417a4442e35f11bf3f7 (diff)
downloadmongo-ce76085e2464c38119b307851d4c63687d9a581f.tar.gz
SERVER-28988 add ReplicationProcess
This class is intended to hold replication state in a secondary node related to the copying and applying operations from the sync source. This initial implementation holds a cached copy of the rollback ID only.
Diffstat (limited to 'src/mongo/s/sharding_mongod_test_fixture.cpp')
-rw-r--r--src/mongo/s/sharding_mongod_test_fixture.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mongo/s/sharding_mongod_test_fixture.cpp b/src/mongo/s/sharding_mongod_test_fixture.cpp
index 9cac75212fd..8685b7ebc6d 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/replication_process.h"
#include "mongo/db/repl/storage_interface_mock.h"
#include "mongo/db/service_context_noop.h"
#include "mongo/executor/network_interface_mock.h"
@@ -125,7 +126,11 @@ void ShardingMongodTestFixture::setUp() {
repl::ReplicationCoordinator::set(service, std::move(replCoordPtr));
auto storagePtr = stdx::make_unique<repl::StorageInterfaceMock>();
- storagePtr->initializeRollbackID(_opCtx.get());
+
+ repl::ReplicationProcess::set(service,
+ stdx::make_unique<repl::ReplicationProcess>(storagePtr.get()));
+ repl::ReplicationProcess::get(_opCtx.get())->initializeRollbackID(_opCtx.get());
+
repl::StorageInterface::set(service, std::move(storagePtr));
service->setOpObserver(stdx::make_unique<OpObserverImpl>());