summaryrefslogtreecommitdiff
path: root/src/mongo/db/logical_time_validator_test.cpp
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2018-03-07 16:04:15 -0500
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2018-03-07 16:13:15 -0500
commiteb90269e893cd978d880c403d344343a9b9eeacd (patch)
treef0236d5273d1bf8bf9335e3b338f63d411145606 /src/mongo/db/logical_time_validator_test.cpp
parent8784e594b52f70a14a7780986d841740a1273224 (diff)
downloadmongo-eb90269e893cd978d880c403d344343a9b9eeacd.tar.gz
SERVER-29908 Fix broken keys_collection_manager_sharding_test
Diffstat (limited to 'src/mongo/db/logical_time_validator_test.cpp')
-rw-r--r--src/mongo/db/logical_time_validator_test.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mongo/db/logical_time_validator_test.cpp b/src/mongo/db/logical_time_validator_test.cpp
index 5db41df3d72..2b44cd12726 100644
--- a/src/mongo/db/logical_time_validator_test.cpp
+++ b/src/mongo/db/logical_time_validator_test.cpp
@@ -37,7 +37,7 @@
#include "mongo/db/server_options.h"
#include "mongo/db/signed_logical_time.h"
#include "mongo/db/time_proof_service.h"
-#include "mongo/platform/basic.h"
+#include "mongo/s/catalog/dist_lock_manager_mock.h"
#include "mongo/s/config_server_test_fixture.h"
#include "mongo/stdx/memory.h"
#include "mongo/unittest/unittest.h"
@@ -76,6 +76,15 @@ protected:
}
/**
+ * Intentionally create a DistLockManagerMock, even though this is a config serfver test in
+ * order to avoid the lock pinger thread from executing and accessing uninitialized state.
+ */
+ std::unique_ptr<DistLockManager> makeDistLockManager(
+ std::unique_ptr<DistLockCatalog> distLockCatalog) override {
+ return stdx::make_unique<DistLockManagerMock>(std::move(distLockCatalog));
+ }
+
+ /**
* Forces KeyManager to refresh cache and generate new keys.
*/
void refreshKeyManager() {