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()):
--
To view, visit https://gerrit.wikimedia.org/r/542765
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Id79c61599ac3df9ae8781da5ff5a0d16553f1d43
Gerrit-Change-Number: 542765
Gerrit-PatchSet: 1
Gerrit-Owner: Zhuyifei1999 <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot (75)
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits