diff options
author | Andrew Shuvalov <andrew.shuvalov@mongodb.com> | 2021-11-12 16:39:46 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-12-28 21:25:36 +0000 |
commit | c3e7c54097f8634ce92bb03667456fc8b6866577 (patch) | |
tree | 6850e4adca9007e583c4e2b0448d798ffe76ac46 | |
parent | a3cf11e587597355177c50acc0af8631a6304463 (diff) | |
download | mongo-c3e7c54097f8634ce92bb03667456fc8b6866577.tar.gz |
SERVER-61438 fix race in FaultManagerTest
-rw-r--r-- | src/mongo/db/process_health/health_observer_test.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/process_health/health_observer_test.cpp b/src/mongo/db/process_health/health_observer_test.cpp index 61b8d76487c..a219fca8183 100644 --- a/src/mongo/db/process_health/health_observer_test.cpp +++ b/src/mongo/db/process_health/health_observer_test.cpp @@ -226,9 +226,9 @@ TEST_F(FaultManagerTest, Stats) { waitForTransitionIntoState(FaultState::kTransientFault); auto observer = manager().getHealthObserversTest()[0]; + assertSoon([&observer] { return !observer->getStats().currentlyRunningHealthCheck; }); auto stats = observer->getStats(); ASSERT_TRUE(manager().getConfig().isHealthObserverEnabled(observer->getType())); - ASSERT_FALSE(stats.currentlyRunningHealthCheck); ASSERT_TRUE(stats.lastTimeCheckStarted >= clockSource().now()); ASSERT_TRUE(stats.lastTimeCheckCompleted >= stats.lastTimeCheckStarted); ASSERT_TRUE(stats.completedChecksCount >= 1); |