diff options
Diffstat (limited to 'src/mongo/db/repl/oplog_applier_impl_test_fixture.h')
-rw-r--r-- | src/mongo/db/repl/oplog_applier_impl_test_fixture.h | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/src/mongo/db/repl/oplog_applier_impl_test_fixture.h b/src/mongo/db/repl/oplog_applier_impl_test_fixture.h index 76e060faabc..2d632351b62 100644 --- a/src/mongo/db/repl/oplog_applier_impl_test_fixture.h +++ b/src/mongo/db/repl/oplog_applier_impl_test_fixture.h @@ -45,6 +45,26 @@ class BSONObj; class OperationContext; namespace repl { + +/** + * Test only subclass of OplogApplierImpl that makes applyOplogGroup a public method. + */ +class TestApplyOplogGroupApplier : public OplogApplierImpl { +public: + TestApplyOplogGroupApplier(ReplicationConsistencyMarkers* consistencyMarkers, + StorageInterface* storageInterface, + const OplogApplier::Options& options) + : OplogApplierImpl(nullptr, + nullptr, + nullptr, + nullptr, + consistencyMarkers, + storageInterface, + options, + nullptr) {} + using OplogApplierImpl::applyOplogGroup; +}; + /** * OpObserver for OplogApplierImpl test fixture. */ @@ -116,14 +136,6 @@ protected: ServiceContext* serviceContext; OplogApplierImplOpObserver* _opObserver = nullptr; - // Implements the OplogApplierImpl::ApplyGroupFn interface and does nothing. - static Status noopApplyOperationFn(OperationContext*, - MultiApplier::OperationPtrs*, - OplogApplierImpl* oai, - WorkerMultikeyPathInfo*) { - return Status::OK(); - } - OpTime nextOpTime() { static long long lastSecond = 1; return OpTime(Timestamp(Seconds(lastSecond++), 0), 1LL); |