summaryrefslogtreecommitdiff
path: root/src/mongo/watchdog
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2021-09-27 19:08:32 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-09-27 23:35:27 +0000
commit6b3acc72af58963a772213cc882e34b6db5bf144 (patch)
tree1c37708f6b81afac87a0f4605261f304695cfdd5 /src/mongo/watchdog
parent8f7c3dd749c5f2a6c410e19e78fad96fb0bf03cb (diff)
downloadmongo-6b3acc72af58963a772213cc882e34b6db5bf144.tar.gz
SERVER-59618 add LockerNoopClientObserver and register this ClientObserver in unit tests with Service Context
Diffstat (limited to 'src/mongo/watchdog')
-rw-r--r--src/mongo/watchdog/watchdog_test.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/watchdog/watchdog_test.cpp b/src/mongo/watchdog/watchdog_test.cpp
index fe2654aee79..178fa9a3411 100644
--- a/src/mongo/watchdog/watchdog_test.cpp
+++ b/src/mongo/watchdog/watchdog_test.cpp
@@ -36,8 +36,8 @@
#include <memory>
#include "mongo/db/client.h"
+#include "mongo/db/concurrency/locker_noop_service_context_test_fixture.h"
#include "mongo/db/service_context.h"
-#include "mongo/db/service_context_test_fixture.h"
#include "mongo/logv2/log.h"
#include "mongo/unittest/death_test.h"
#include "mongo/unittest/temp_dir.h"
@@ -93,7 +93,7 @@ private:
std::uint32_t _wait{0};
};
-class PeriodicThreadTest : public ServiceContextTest {};
+class PeriodicThreadTest : public LockerNoopServiceContextTest {};
// Tests:
// 1. Make sure it runs at least N times
@@ -246,7 +246,7 @@ private:
std::uint32_t _wait{0};
};
-class WatchdogCheckThreadTest : public ServiceContextTest {};
+class WatchdogCheckThreadTest : public LockerNoopServiceContextTest {};
// Positive: Make sure check thread runs at least N times and stops correctly
TEST_F(WatchdogCheckThreadTest, Basic) {
@@ -301,7 +301,7 @@ private:
};
-class WatchdogMonitorThreadTest : public ServiceContextTest {};
+class WatchdogMonitorThreadTest : public LockerNoopServiceContextTest {};
// Positive: Make sure monitor thread signals death if the check thread never starts
TEST_F(WatchdogMonitorThreadTest, Basic) {
@@ -376,7 +376,7 @@ TEST_F(WatchdogMonitorThreadTest, SleepyHungCheck) {
checkThread.shutdown();
}
-class WatchdogMonitorTest : public ServiceContextTest {};
+class WatchdogMonitorTest : public LockerNoopServiceContextTest {};
// Positive: Make sure watchdog monitor signals death if a check is unresponsive
TEST_F(WatchdogMonitorTest, SleepyHungCheck) {
@@ -471,7 +471,7 @@ TEST_F(WatchdogMonitorTest, PauseAndResume) {
ASSERT_EQ(lastCounter, counterCheckPtr->getCounter());
}
-class DirectoryCheckTest : public ServiceContextTest {};
+class DirectoryCheckTest : public LockerNoopServiceContextTest {};
// Positive: Do a sanity check that directory check passes
TEST_F(DirectoryCheckTest, Basic) {