1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
Description: Fix test failures in test_load_test
Fix two issues in the load_test module:
.
1. Fix typo in test: NoActionScript was setting _thread_class but the
actual implementation uses _worker_class. This caused the test to use
the default RequestWorker instead of NoopRequestWorker, leading to
queue.Full exceptions when the queue filled up because items weren't
being processed.
.
2. Replace deprecated isSet() with is_set() to fix deprecation warnings
on Python 3.13+.
Author: Jelmer Vernooij <jelmer@debian.org>
Forwarded: not-needed
Last-Update: 2025-10-29
--- a/loggerhead/load_test.py
+++ b/loggerhead/load_test.py
@@ -115,7 +115,7 @@ class RequestWorker(object):
self.queue.task_done()
def run(self, stop_event):
- while not stop_event.isSet():
+ while not stop_event.is_set():
try:
self.step_next()
except Empty:
--- a/loggerhead/tests/test_load_test.py
+++ b/loggerhead/tests/test_load_test.py
@@ -158,7 +158,7 @@ class TestRequestWorker(tests.TestCaseW
class NoActionScript(load_test.ActionScript):
- _thread_class = NoopRequestWorker
+ _worker_class = NoopRequestWorker
_default_blocking_timeout = 0.01
|