[SERVER-58959] Fix and reenable `Interruptible::WaitUntilDeadline` test Created: 29/Jul/21  Updated: 29/Oct/23  Resolved: 09/Aug/21

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 5.1.0-rc0, 4.4.24, 5.0.20

Type: Task Priority: Major - P3
Reporter: Amirsaman Memaripour Assignee: Amirsaman Memaripour
Resolution: Fixed Votes: 0
Labels: servicearch-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
related to SERVER-58958 Temporarily disable `Interruptible::W... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.0, v4.4
Sprint: Service Arch 2021-08-23
Participants:
Story Points: 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.



 Comments   
Comment by Githook User [ 19/Jul/23 ]

Author:

{'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}

Message: SERVER-58959 Remove `Interruptible::WaitUntilDeadline` test

(cherry picked from commit bf7dab88969b87f60042e08a794451e606e4e22e)
Branch: v4.4
https://github.com/mongodb/mongo/commit/4355c677f5c742c721045b96f49b115fc38f328c

Comment by Githook User [ 12/Jul/23 ]

Author:

{'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}

Message: SERVER-58959 Remove `Interruptible::WaitUntilDeadline` test

(cherry picked from commit bf7dab88969b87f60042e08a794451e606e4e22e)
Branch: v5.0
https://github.com/mongodb/mongo/commit/86e5db1b2f88de77ce612fc572d22636e512d854

Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 09/Aug/21 ]

Author:

{'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}

Message: SERVER-58959 Remove `Interruptible::WaitUntilDeadline` test
Branch: master
https://github.com/mongodb/mongo/commit/bf7dab88969b87f60042e08a794451e606e4e22e

Comment by Amirsaman Memaripour [ 06/Aug/21 ]

CR: https://mongodbcr.appspot.com/818810002/

Generated at Thu Feb 08 05:45:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.