hotfix: resolve pytest db deadlock (extracted from Saurabhsing21 PR #707#712
Merged
jmadden173 merged 1 commit intojlab-sensing:mainfrom Mar 21, 2026
Merged
Conversation
Contributor
|
I tested this locally and it was functional. Only error I got was an existing broken test case. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tracking PR
Purpose of the PR
Unblocks the global backend CI pipeline by resolving an "idle in transaction" database deadlock during
pytestteardown.Summary
The
pytest --covjob is currently hanging indefinitely across all open PRs after successfully completingtest_cell_search_by_name. This is caused by tests not properly cleaning up SQLAlchemy sessions, leaving Postgres locked.@Saurabhsing21 already successfully diagnosed and wrote the fix for this in
backend/tests/conftest.pyas part of his larger CSV streaming PR (#707). Because the maintainers are currently bandwidth-limited with finals week, I have extracted only Saurabh'sconftest.pytest harness improvements into this standalone hotfix.Merging this will turn the backend checks green for all other contributors, allowing Saurabh's #707 to pass CI as well. All credit for this code goes to Saurabh.
Development Environment
Task List
CHANGELOG.mdRelevant Issues
Closes #708