diff options
author | Benety Goh <benety@mongodb.com> | 2016-04-14 20:08:55 -0400 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2016-04-18 15:46:13 -0400 |
commit | 5f0f211ee87b53ac6376784f4c4b50e83a3eeeac (patch) | |
tree | 992ff11d70f26d871deb396a1f18a55a03f1daa6 /src/mongo/db/repl/rs_rollback_test.cpp | |
parent | 651d0636b62be5d5f3def4562ee81dbd408a26f6 (diff) | |
download | mongo-5f0f211ee87b53ac6376784f4c4b50e83a3eeeac.tar.gz |
SERVER-18038 replaced uses of minvalid.h with repl storage interface
Diffstat (limited to 'src/mongo/db/repl/rs_rollback_test.cpp')
-rw-r--r-- | src/mongo/db/repl/rs_rollback_test.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mongo/db/repl/rs_rollback_test.cpp b/src/mongo/db/repl/rs_rollback_test.cpp index 04681ebf365..a50570d4160 100644 --- a/src/mongo/db/repl/rs_rollback_test.cpp +++ b/src/mongo/db/repl/rs_rollback_test.cpp @@ -43,7 +43,6 @@ #include "mongo/db/db_raii.h" #include "mongo/db/dbhelpers.h" #include "mongo/db/jsobj.h" -#include "mongo/db/repl/minvalid.h" #include "mongo/db/repl/operation_context_repl_mock.h" #include "mongo/db/repl/oplog.h" #include "mongo/db/repl/oplog_interface.h" @@ -52,6 +51,8 @@ #include "mongo/db/repl/replication_coordinator_mock.h" #include "mongo/db/repl/rollback_source.h" #include "mongo/db/repl/rs_rollback.h" +#include "mongo/db/repl/storage_interface.h" +#include "mongo/db/repl/storage_interface_mock.h" #include "mongo/db/service_context_d_test_fixture.h" #include "mongo/stdx/memory.h" #include "mongo/unittest/unittest.h" @@ -142,10 +143,13 @@ void RSRollbackTest::setUp() { _txn.reset(new OperationContextReplMock(&cc(), 1)); _coordinator = new ReplicationCoordinatorRollbackMock(); - setGlobalReplicationCoordinator(_coordinator); + auto serviceContext = mongo::getGlobalServiceContext(); + ReplicationCoordinator::set(serviceContext, + std::unique_ptr<ReplicationCoordinator>(_coordinator)); + StorageInterface::set(serviceContext, stdx::make_unique<StorageInterfaceMock>()); setOplogCollectionName(); - repl::setMinValid(_txn.get(), {OpTime{}, OpTime{}}); + repl::StorageInterface::get(_txn.get())->setMinValid(_txn.get(), {OpTime{}, OpTime{}}); } void RSRollbackTest::tearDown() { @@ -162,7 +166,8 @@ void RSRollbackTest::tearDown() { void noSleep(Seconds seconds) {} TEST_F(RSRollbackTest, InconsistentMinValid) { - repl::setMinValid(_txn.get(), + repl::StorageInterface::get(_txn.get()) + ->setMinValid(_txn.get(), {OpTime(Timestamp(Seconds(0), 0), 0), OpTime(Timestamp(Seconds(1), 0), 0)}); auto status = syncRollback(_txn.get(), OplogInterfaceMock(kEmptyMockOperations), |