8000 gh-116439: Ensure thread is joined in test_empty_authkey by colesbury · Pull Request #116442 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-116439: Ensure thread is joined in test_empty_authkey #116442

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-116439: Ensure thread is joined in test_empty_authkey
  • Loading branch information
colesbury committed Mar 6, 2024
commit fa4a1afd448e8c81e0b408a0f8ae8ae0d6e8caf7
7 changes: 4 additions & 3 deletions Lib/test/_test_multiprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -3516,9 +3516,10 @@ def run(addr, authkey):
key = b""

with self.connection.Listener(authkey=key) as listener:
threading.Thread(target=run, args=(listener.address, key)).start()
with listener.accept() as d:
self.assertEqual(d.recv(), 1729)
t = threading.Thread(target=run, args=(listener.address, key))
with threading_helper.start_threads([t]):
with listener.accept() as d:
self.assertEqual(d.recv(), 1729)

if self.TYPE == 'processes':
self.assertRaises(OSError, listener.accept)
Expand Down
0