test.support.threading_cleanup() now logs a warning on failure#1195
test.support.threading_cleanup() now logs a warning on failure#1195vstinner merged 1 commit intopython:masterfrom vstinner:threading_cleanup
Conversation
|
@Haypo, thanks for your PR! By analyzing the history of the files in this pull request, we identified @Yhg1s, @ncoghlan and @benjaminp to be potential reviewers. |
The @reap_threads decorator and the threading_cleanup() function of test.support now log a warning if they fail to clenaup threads. Fix also the usage of support.threading_cleanup() in test_urllib2_localnet. The log may help to debug such other warning seen on the AMD64 FreeBSD CURRENT Non-Debug 3.x buildbot: Warning -- threading._dangling was modified by test_logging
|
Oh, good job Travis! The GCC job passed, but the Clang job catched a bug in test_urllib2_localnet doesn't come from my change. It's just that my change makes the bug more obvious :-) It's now fixed as well. |
|
I got following strange warning: Is this alright? I mean warning about 0 threads. |
I am also surprised by the warning, but I also saw it. I don't understand well how the function works. It's something about "dangling threads". If I understood correctly, if the number of dangling threads is not zero, a test "leaks" threads and should be fixed to not have side effect on following tests. |
|
I added the warning because I saw that test_quick_connect() of test_asyncore took much longer than expected sometimes but only on FreeBSD. It was a bug which was quiet. The warning should help to detect bugs. |
|
I also proposed a buildbot change to catch more warnings on buildbot: python/buildmaster-config#1 (comment) |
The @reap_threads decorator and the threading_cleanup() function of
test.support now log a warning if they fail to clenaup threads.
The log may help to debug such other warning seen on the AMD64
FreeBSD CURRENT Non-Debug 3.x buildbot:
Warning -- threading._dangling was modified by test_logging