-
Notifications
You must be signed in to change notification settings - Fork 457
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: use semaphore instead of lock for Endpoint.running (#8112)
## Problem Ahem, let's try this again. #8110 had a spooky failure in test_multi_attach where a call to Endpoint.stop() timed out waiting for a lock, even though we can see an earlier call completing and releasing the lock. I suspect something weird is going on with the way pytest runs tests across processes, or use of asyncio perhaps. Anyway: the simplest fix is to just use a semaphore instead: if we don't lock we can't deadlock. ## Summary of changes - Make Endpoint.running a semaphore, where we add a unit to its counter when starting the process and atomically decrement it when stopping.
- Loading branch information
Showing
1 changed file
with
26 additions
and
24 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
f0e2bb7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3316 tests run: 3181 passed, 9 failed, 126 skipped (full report)
Failures on Postgres 15
test_config_with_unknown_keys_is_bad_request
: debugtest_no_config[application/json]
: debugtest_no_config[None]
: debugtest_null_config
: debugtest_create_multiple_timelines_parallel
: debugFailures on Postgres 14
test_sharding_autosplit[github-actions-selfhosted]
: releasetest_basebackup_with_high_slru_count[github-actions-selfhosted-sequential-10-13-30]
: releasetest_basebackup_with_high_slru_count[github-actions-selfhosted-vectored-10-13-30]
: releasetest_pageserver_max_throughput_getpage_at_latest_lsn[github-actions-selfhosted-10-6-30]
: releaseTest coverage report is not available
f0e2bb7 at 2024-06-19T17:29:37.535Z :recycle: