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

Lines changed: 3 additions & 0 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy