Skip to content

Commit

Permalink
de-flake serve integration test (#15726)
Browse files Browse the repository at this point in the history
  • Loading branch information
zzstoatzz authored Oct 16, 2024
1 parent 739d3e0 commit 58c881b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions flows/serve_a_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ def count_runs(counter_dir: Path):


if __name__ == "__main__":
TIMEOUT: int = 11
TIMEOUT: int = 15
INTERVAL_SECONDS: int = 3

EXPECTED_N_FLOW_RUNS: int = TIMEOUT // INTERVAL_SECONDS
MINIMUM_EXPECTED_N_FLOW_RUNS: int = 3

signal.signal(signal.SIGALRM, timeout_handler)
signal.alarm(TIMEOUT)
Expand All @@ -49,7 +49,7 @@ def count_runs(counter_dir: Path):
actual_run_count = count_runs(counter_dir)

assert (
actual_run_count >= EXPECTED_N_FLOW_RUNS
), f"Expected at least {EXPECTED_N_FLOW_RUNS} flow runs, got {actual_run_count}"
actual_run_count >= MINIMUM_EXPECTED_N_FLOW_RUNS
), f"Expected at least {MINIMUM_EXPECTED_N_FLOW_RUNS} flow runs, got {actual_run_count}"

print(f"Successfully completed and audited {actual_run_count} flow runs")

0 comments on commit 58c881b

Please sign in to comment.