mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
gh-93761: Fix test_logging test_config_queue_handler() race condition (#93952)
Fix a race condition in test_config_queue_handler() of test_logging.
This commit is contained in:
parent
59c1b33805
commit
dba3fa57e2
1 changed files with 3 additions and 0 deletions
|
@ -3603,6 +3603,9 @@ class ConfigDictTest(BaseTest):
|
|||
if qh.listener.queue.empty():
|
||||
break
|
||||
|
||||
# wait until the handler completed its last task
|
||||
qh.listener.queue.join()
|
||||
|
||||
with open(fn, encoding='utf-8') as f:
|
||||
data = f.read().splitlines()
|
||||
self.assertEqual(data, ['foo', 'bar', 'baz'])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue