From 437352cd7dbc158343e2929888d265928b6ca8b7 Mon Sep 17 00:00:00 2001 From: Misha Tyulenev Date: Wed, 8 Feb 2017 14:18:29 -0500 Subject: SERVER-27828: Pass ServiceContext to oplog and ReplicationCoordinator methods that will use LogicalClock --- src/mongo/db/repl/rs_rollback_test.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/mongo/db/repl/rs_rollback_test.cpp') diff --git a/src/mongo/db/repl/rs_rollback_test.cpp b/src/mongo/db/repl/rs_rollback_test.cpp index 51da192da60..988fe98face 100644 --- a/src/mongo/db/repl/rs_rollback_test.cpp +++ b/src/mongo/db/repl/rs_rollback_test.cpp @@ -77,14 +77,11 @@ ReplSettings createReplSettings() { class ReplicationCoordinatorRollbackMock : public ReplicationCoordinatorMock { public: - ReplicationCoordinatorRollbackMock(); - void resetLastOpTimesFromOplog(OperationContext* txn) override; + ReplicationCoordinatorRollbackMock(ServiceContext* service) + : ReplicationCoordinatorMock(service, createReplSettings()) {} + void resetLastOpTimesFromOplog(OperationContext* txn) override {} }; -ReplicationCoordinatorRollbackMock::ReplicationCoordinatorRollbackMock() - : ReplicationCoordinatorMock(createReplSettings()) {} - -void ReplicationCoordinatorRollbackMock::resetLastOpTimesFromOplog(OperationContext* txn) {} class RollbackSourceMock : public RollbackSource { public: @@ -144,7 +141,7 @@ private: void RSRollbackTest::setUp() { ServiceContextMongoDTest::setUp(); _txn = cc().makeOperationContext(); - _coordinator = new ReplicationCoordinatorRollbackMock(); + _coordinator = new ReplicationCoordinatorRollbackMock(_txn->getServiceContext()); auto serviceContext = getServiceContext(); ReplicationCoordinator::set(serviceContext, -- cgit v1.2.1