Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[3.6] bpo-31250: test_asyncio: fix dangling threads#3517

Merged
vstinner merged 2 commits into
python:3.6python/cpython:3.6from
vstinner:asyncio36Copy head branch name to clipboard
Sep 12, 2017
Merged

[3.6] bpo-31250: test_asyncio: fix dangling threads#3517
vstinner merged 2 commits into
python:3.6python/cpython:3.6from
vstinner:asyncio36Copy head branch name to clipboard

Conversation

@vstinner

@vstinner vstinner commented Sep 12, 2017

Copy link
Copy Markdown
Member

* Explicitly call shutdown(wait=True) on executors to wait until all
  threads complete to prevent side effects between tests.
* Fix test_loop_self_reading_exception(): don't mock loop.close().
  Previously, the original close() method was called rather than the
  mock, because how set_event_loop() registered loop.close().

(cherry picked from commit 16432be)
Call doCleanups() to close the loop after calling
executor.shutdown(wait=True): see TestCase.set_event_loop() of
asyncio.test_utils.

Replace also gc.collect() with support.gc_collect().

(cherry picked from commit e8a533f)
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks, @Haypo!

@vstinner vstinner deleted the asyncio36 branch September 12, 2017 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.