mirror of https://github.com/python/cpython
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
|
@ -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…
Reference in New Issue