Skip to content

Conversation

@blast-hardcheese
Copy link
Contributor

Why

Attempting to run uv run pytest -k test_ignore_flood_subscription hangs for a significant amount of time.

This is because in __aexit__ we await on the server's wait_closed(), which never completes because we still haven't called server.close():

    async def __aexit__(...) -> None:
        self.ws_server.close()
        await self.ws_server.wait_closed()

An alternate approach would be to wrap the entire innards of the async context in a try: ... finally: server.close().

What changed

Reflowed clientserver text fixture to avoid a deadlock.

Test plan

CI

@blast-hardcheese blast-hardcheese requested a review from a team as a code owner March 16, 2025 06:07
@blast-hardcheese blast-hardcheese requested review from ryantm and removed request for a team March 16, 2025 06:07
@blast-hardcheese blast-hardcheese merged commit c2fe359 into main Mar 18, 2025
3 checks passed
@blast-hardcheese blast-hardcheese deleted the dstewart/bug/fix-test-deadlock branch March 18, 2025 04:28
@blast-hardcheese blast-hardcheese added bug Something isn't working chore and removed bug Something isn't working labels Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants