Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recover from deadlock in session_truncate fixture #1885

Merged
merged 1 commit into from
Sep 27, 2023
Merged

Conversation

jace
Copy link
Member

@jace jace commented Sep 27, 2023

This updated fixture does not have a test, so we must assume it works until a deadlock error happens again. My first attempt at writing a test did not go well because (a) we're testing for an error in a fixture, which requires pytest's pytester plugin (disabled by default) and a special operating condition for it, and (b) to simulate a PostgreSQL deadlock we need parallel database connections (thread, process or async with wait) that are also contained within a single test and teardown cleanly. This is a larger task than I had expected, so I'll leave it for another PR.

@jace jace requested a review from djamg September 27, 2023 12:06
@jace jace merged commit 93a21d3 into main Sep 27, 2023
@jace jace deleted the truncate-deadlock branch September 27, 2023 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants