Skip to content

Commit

Permalink
pythongh-116439: Ensure thread is joined in test_empty_authkey
Browse files Browse the repository at this point in the history
  • Loading branch information
colesbury committed Mar 6, 2024
1 parent 8a8e920 commit fa4a1af
Showing 1 changed file with 4 additions and 3 deletions.
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 comments on commit fa4a1af

Please sign in to comment.