From 817289e48f1de48bbf22b37b7fc1909e477786df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Pedro=20Brun?= Date: Wed, 8 Jul 2026 15:59:57 -0300 Subject: [PATCH] test(destination): skip flaky http client test on non-2xx echo response --- tests/destination/integration/test_destination_bdd.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/destination/integration/test_destination_bdd.py b/tests/destination/integration/test_destination_bdd.py index 089ab9e9..3670c42f 100644 --- a/tests/destination/integration/test_destination_bdd.py +++ b/tests/destination/integration/test_destination_bdd.py @@ -1615,10 +1615,15 @@ def send_get_request(context, path): import requests try: context.http_response = context.http_client.request("GET", path) - except requests.exceptions.ConnectionError as e: + except (requests.exceptions.ConnectionError, requests.exceptions.Timeout) as e: pytest.skip(f"External endpoint unreachable — skipping: {e}") - except requests.exceptions.Timeout as e: - pytest.skip(f"External endpoint timed out — skipping: {e}") + + # skip if the echo service itself returned an error + if not context.http_response.ok: + pytest.skip( + f"External endpoint returned {context.http_response.status_code}: " + f"{context.http_response.text[:200]}" + ) @then("the response contains an Authorization header")