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

[2.7] bpo-31234: Join threads explicitly in tests #7406

Merged
merged 2 commits into from
Jun 4, 2018
Merged

[2.7] bpo-31234: Join threads explicitly in tests #7406

merged 2 commits into from
Jun 4, 2018

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Jun 4, 2018

  • Add support.wait_threads_exit(): context manager looping at exit
    until the number of threads decreases to its original number.

  • Add some missing thread.join()

  • test_asyncore.test_send(): call explicitly t.join() because the cleanup
    function is only called outside the test method, whereas the method
    has a @test_support.reap_threads decorator

  • test_hashlib: replace threading.Event with thread.join()

  • test_thread:

    • Use wait_threads_exit() context manager
    • Replace test_support with support
    • test_forkinthread(): check child process exit status in the
      main thread to better handle error.

https://bugs.python.org/issue31234

* Add support.wait_threads_exit(): context manager looping at exit
  until the number of threads decreases to its original number.
* Add some missing thread.join()
* test_asyncore.test_send(): call explicitly t.join() because the cleanup
  function is only called outside the test method, whereas the method
  has a @test_support.reap_threads decorator
* test_hashlib: replace threading.Event with thread.join()
* test_thread:

  * Use wait_threads_exit() context manager
  * Replace test_support with support
  * test_forkinthread(): check child process exit status in the
    main thread to better handle error.
The module name is different in Python 2.
@vstinner vstinner merged commit 1463518 into python:2.7 Jun 4, 2018
@bedevere-bot
Copy link

@vstinner: Please replace # with GH- in the commit message next time. Thanks!

@vstinner vstinner deleted the join_threads27 branch June 4, 2018 21:53
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.

3 participants