jenkins-bot merged this change.
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(-)
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 change 542765. To unsubscribe, or for help writing mail filters, visit settings.