Skip to content

Commit

Permalink
handle close_alert_response.status_code == 202
Browse files Browse the repository at this point in the history
  • Loading branch information
talebzeghmi committed May 22, 2024
1 parent f855780 commit 142c09c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion metaflow/plugins/aip/tests/run_integration_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,12 @@ def test_error_and_opsgenie_alert(pytestconfig) -> None:
data=json.dumps(close_alert_data),
headers=opsgenie_auth_headers,
)
if close_alert_response.status_code == 200:
# Sometimes the response status code is 202, signaling
# the request has been accepted and is being queued for processing.
if (
close_alert_response.status_code == 200
or close_alert_response.status_code == 202
):
break
time.sleep(3)

Expand Down

0 comments on commit 142c09c

Please sign in to comment.