From 63b4dff0e2496b610de26d160b9288314795ced0 Mon Sep 17 00:00:00 2001 From: Randolph Tan Date: Mon, 15 Jun 2015 16:07:15 -0400 Subject: SERVER-18525 Mock out tick source in replset_dist_lock_manager_test --- src/mongo/db/service_context.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/mongo/db/service_context.h') diff --git a/src/mongo/db/service_context.h b/src/mongo/db/service_context.h index accd9232947..7cf48b9861f 100644 --- a/src/mongo/db/service_context.h +++ b/src/mongo/db/service_context.h @@ -36,6 +36,7 @@ #include "mongo/platform/unordered_set.h" #include "mongo/stdx/functional.h" #include "mongo/util/decorable.h" +#include "mongo/util/tick_source.h" namespace mongo { @@ -303,6 +304,16 @@ namespace mongo { */ virtual OpObserver* getOpObserver() = 0; + /** + * Returns the tick source set in this context. + */ + TickSource* getTickSource() const; + + /** + * Replaces the current tick source with a new one. + */ + void setTickSource(std::unique_ptr newSource); + protected: ServiceContext() = default; @@ -323,6 +334,8 @@ namespace mongo { */ std::vector> _clientObservers; ClientSet _clients; + + std::unique_ptr _tickSource; }; /** -- cgit v1.2.1