Skip to content

Add delay & retry to flakey weight splits test #7324

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Feb 27, 2025
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,19 @@ def test_vsr_weight_changes_dynamic_reload_many_splits(
print("Step 3: Verify hitting the other backend.")
ensure_response_from_backend(backends32_url, vsr_weight_changes_dynamic_reload_many_splits_setup.vs_host)
wait_and_assert_status_code(200, backends32_url, vsr_weight_changes_dynamic_reload_many_splits_setup.vs_host)
wait_before_test(1)
resp = requests.get(
backends32_url,
headers={"host": vsr_weight_changes_dynamic_reload_many_splits_setup.vs_host},
)
assert "backend2" in resp.text
found = False
interval = 1
for _ in range(60):
resp = requests.get(
backends32_url,
headers={"host": vsr_weight_changes_dynamic_reload_many_splits_setup.vs_host},
)
if resp.status_code == 200 and "backend2" in resp.text:
print(
f"After {_} retries at {interval} second interval, got {resp.status_code} & found backend2 in response. Continue with tests..."
)
found = True
break
wait_before_test(interval)

assert found is True
Loading