Skip to content
Snippets Groups Projects
Unverified Commit cab25d69 authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

longer stress tests

parent 9aa06769
No related branches found
No related tags found
No related merge requests found
Pipeline #62138 passed with stages
in 1 minute and 42 seconds
......@@ -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
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment