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

Close an asyncio event loop in the test suite #634

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

kurtmckee
Copy link
Contributor

Noticed this warning while attempting to run the test suite with warnings enabled.

tests/middleware/test_asyncio.py::test_event_loop_thread_run_coroutine_interrupted
ResourceWarning: unclosed event loop <_UnixSelectorEventLoop running=False closed=False debug=False>

This PR makes calls to .stop() join the thread and then close the event loop, which resolves the warning above.

@Bogdanp Bogdanp merged commit 5bc361b into Bogdanp:master Jun 25, 2024
11 checks passed
@Bogdanp
Copy link
Owner

Bogdanp commented Jun 25, 2024

Thanks!

@kurtmckee kurtmckee deleted the close-event-loop branch June 25, 2024 12:08
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