Details
-
Task
-
Status: Closed
-
Major - P3
-
Resolution: Fixed
-
None
-
Fully Compatible
-
Service Arch 2021-08-23
-
1
Description
The following assertions may fail when running the test on Evergreen, and SERVER-58958 disabled the test to prevent BFs and commit-queue failures.
TEST(Interruptible, WaitUntilDeadline) {
|
auto interruptible = std::make_unique<DummyInterruptible>();
|
const auto sleepFor = Milliseconds(500); |
|
auto mutex = MONGO_MAKE_LATCH();
|
stdx::condition_variable cv;
|
stdx::unique_lock<Latch> lk(mutex);
|
|
const auto start = Date_t::now(); |
Date_t deadline = start + sleepFor;
|
interruptible->waitForConditionOrInterruptUntil(cv, lk, deadline, []() { return false; }); |
const auto end = Date_t::now(); |
|
ASSERT_GTE(end, deadline - DummyInterruptible::kPrecision);
|
ASSERT_LTE(end, deadline + DummyInterruptible::kPrecision);
|
}
|
This ticket should make the test more resilient to potential OS scheduling issues, or remove the test if doing so is not feasible.
Attachments
Issue Links
- related to
-
SERVER-58958 Temporarily disable `Interruptible::WaitUntilDeadline` test
-
- Closed
-