diff options
author | Ian Boros <ian.boros@10gen.com> | 2019-01-04 18:20:17 -0500 |
---|---|---|
committer | Ian Boros <ian.boros@10gen.com> | 2019-01-11 16:14:17 -0500 |
commit | 424621d33255e28cf5f4988935a0d175f6e9fd78 (patch) | |
tree | 71c5c5c14b0185c5a688511b3e1b67a517e63904 /src/mongo/s/query/results_merger_test_fixture.h | |
parent | 73bce03305b2aa8c94d2400ffdb848ccb0f27588 (diff) | |
download | mongo-424621d33255e28cf5f4988935a0d175f6e9fd78.tar.gz |
SERVER-38858 fix race
Diffstat (limited to 'src/mongo/s/query/results_merger_test_fixture.h')
-rw-r--r-- | src/mongo/s/query/results_merger_test_fixture.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/s/query/results_merger_test_fixture.h b/src/mongo/s/query/results_merger_test_fixture.h index 7b714c568ae..7a0f46c9058 100644 --- a/src/mongo/s/query/results_merger_test_fixture.h +++ b/src/mongo/s/query/results_merger_test_fixture.h @@ -32,6 +32,7 @@ #include "mongo/s/query/async_results_merger.h" #include "mongo/s/sharding_router_test_fixture.h" +#include "mongo/util/clock_source_mock.h" namespace mongo { @@ -241,6 +242,13 @@ protected: remoteCursor.setCursorResponse(std::move(response)); return remoteCursor; } + + ClockSourceMock* getMockClockSource() { + ClockSourceMock* mockClock = dynamic_cast<ClockSourceMock*>( + operationContext()->getServiceContext()->getPreciseClockSource()); + invariant(mockClock); + return mockClock; + } }; } // namespace mongo |