Skip to content

Commit dba3fa5

Browse files
authored
gh-93761: Fix test_logging test_config_queue_handler() race condition (#93952)
Fix a race condition in test_config_queue_handler() of test_logging.
1 parent 59c1b33 commit dba3fa5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Lib/test/test_logging.py

+3
Original file line numberDiff line numberDiff line change
@@ -3603,6 +3603,9 @@ def do_queuehandler_configuration(self, qspec, lspec):
36033603
if qh.listener.queue.empty():
36043604
break
36053605

3606+
# wait until the handler completed its last task
3607+
qh.listener.queue.join()
3608+
36063609
with open(fn, encoding='utf-8') as f:
36073610
data = f.read().splitlines()
36083611
self.assertEqual(data, ['foo', 'bar', 'baz'])

0 commit comments

Comments
 (0)