Message378459
I'm able to reproduce the issue if I reduce the sleep:
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index 4cd8c7e25d..fc395dc473 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -1177,7 +1177,7 @@ class MemoryHandlerTest(BaseTest):
self.mem_hdlr.setTarget(target)
for _ in range(10):
- time.sleep(0.005)
+ time.sleep(1e-9)
self.mem_logger.info("not flushed")
self.mem_logger.warning("flushed")
With the command:
$ ./python -m test test_logging -m test_race_between_set_target_and_flush -F -j10 --fail-env-changed
(...)
0:00:03 load avg: 3.74 [ 18/1] test_logging failed (env changed)
Warning -- threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 2)
Warning -- Dangling thread: <Thread(Thread-1 (removeTarget), started daemon 139860955428608)>
Warning -- Dangling thread: <_MainThread(MainThread, started 139861194377024)> |
|
Date |
User |
Action |
Args |
2020-10-11 22:05:58 | vstinner | set | recipients:
+ vstinner, corona10, shihai1991 |
2020-10-11 22:05:58 | vstinner | set | messageid: <1602453958.48.0.870050010026.issue41739@roundup.psfhosted.org> |
2020-10-11 22:05:58 | vstinner | link | issue41739 messages |
2020-10-11 22:05:58 | vstinner | create | |
|