-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix side effect of not tearing down mongo hook in tests (#46291)
The MongoClient apparently starts a separate thread that runs an active loop that performs sleep every 0.5 second. MongoClient is stored in the Hook and hooks/test_mongo.py stored the hook as object in the test class, which means that the thread has not been torn down and continued to run after mongo tests completed. Subsequently any test that was mocking time.sleep (and skipping waiting) had been spammed by mongo client thread calling sleep() - potentially many times. Earlier attempts to fix this had not succeeded - so they are reverted now as part of this PR, as the original patching of sleep was much nicer there. Revert "Make racy test test_start_pod_startup_interval_seconds less racy (#46282)" This reverts commit 60f0abf. Revert "Make azure test less flaky/racy (#46281)" This reverts commit ae55e22.
- Loading branch information
Showing
4 changed files
with
31 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters