diff --git a/CHANGELOG.md b/CHANGELOG.md index e44b4d0ebb26e0372f92828700ad9dbd95f77f78..476eae31b31336f96874bf2ee399b80830ab0fd0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,3 +7,4 @@ have been made so far, between releases. * removed the requirement for a Queue that for it to be equal to other Queue if their types do match * compile_definitions will now depend on requests * added support for infinite (None) timeouts during start +* stress tests will run for 60 seconds now diff --git a/stress_tests/client.py b/stress_tests/client.py index 00f4296b6ad9359b05518fba466fbc6f481fe87e..f2e6427a3b161bb54cbfb0422dcd27a634cb3aed 100644 --- a/stress_tests/client.py +++ b/stress_tests/client.py @@ -19,6 +19,9 @@ CONNECTIONS_PER_SECOND = 0.9 DISCONNECTS_PER_SECOND_PER_CONNECTION = 0.1 ANSWER_PROBABILITY = 0.7 +RUNNING_INTERVAL = 60 # run for 60 seconds + + def run_multiple_if_probability(probability: float, callable: tp.Callable[[], None]) -> None: prob = random.random() @@ -118,7 +121,7 @@ def run(client_notify, result_client, server_notify, server_result): cad.start() started_at = time.monotonic() terminating = False - while not terminating and (time.monotonic() < started_at + 40): # run for 40 seconds + while not terminating and (time.monotonic() < started_at + RUNNING_INTERVAL): # run for however long is required try: client_notify.get(timeout=1.0) terminating = True