jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/542765 )
Change subject: site_tests.py: Only threads started by the test for test_lock_page ......................................................................
site_tests.py: Only threads started by the test for test_lock_page
There are threads like 'Put-Thread' that are alive and has nothing to do with our deadlock.
Change-Id: Id79c61599ac3df9ae8781da5ff5a0d16553f1d43 --- M tests/site_tests.py 1 file changed, 3 insertions(+), 4 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/site_tests.py b/tests/site_tests.py index 58a8a3b..c7ff572 100644 --- a/tests/site_tests.py +++ b/tests/site_tests.py @@ -1106,15 +1106,14 @@ def test_lock_page(self): """Test the site.lock_page() and site.unlock_page() method.""" # Start few threads + threads = [] for i in range(5): thread = threading.Thread(target=self.worker) thread.setDaemon(True) thread.start() + threads.append(thread)
- current_thread = threading.currentThread() - for thread in threading.enumerate(): - if thread is current_thread: - continue + for thread in threads: thread.join(15) # maximum wait time for all threads
with self.subTest(name=thread.getName()):
pywikibot-commits@lists.wikimedia.org