Skip to content

Fix flaky HTTPS integration test - #191

Merged
jsturtevant merged 1 commit into
mainfrom
jsturtevant-fix-http-ci-flake
Aug 21, 2026
Merged

Fix flaky HTTPS integration test#191
jsturtevant merged 1 commit into
mainfrom
jsturtevant-fix-http-ci-flake

Conversation

@jsturtevant

Copy link
Copy Markdown
Contributor

The HTTPS integration test depended on httpbin.org and intermittently failed when the service returned transient 503 responses.

Use this repository's GitHub page as the real TLS endpoint and retry transport errors or 5xx responses up to three times with exponential backoff (250 ms, then 500 ms). Non-retryable HTTP responses still fail immediately, and the test continues to validate a successful HTTPS response and expected body content.

Signed-off-by: James Sturtevant <jsturtevant@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to reduce flakiness in the HTTPS integration test by removing reliance on httpbin.org and introducing retry behavior for transient failures, while still validating a successful HTTPS response and expected body content.

Changes:

  • Switched the HTTPS test target from httpbin.org to a GitHub-hosted HTTPS endpoint.
  • Added retry logic (up to 3 attempts) with exponential backoff (250ms → 500ms) for transport errors and 5xx responses.
Suppressed comments (1)

src/hyperlight_sandbox/tests/http_integration.rs:140

  • If switching to a static raw file endpoint, the body assertion should match stable file content (e.g., the Apache 2.0 header) instead of relying on GitHub’s repo-page HTML.
                    assert_eq!(resp.status, 200);
                    assert!(String::from_utf8_lossy(&resp.body).contains("hyperlight-sandbox"));

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/hyperlight_sandbox/tests/http_integration.rs
Comment thread src/hyperlight_sandbox/tests/http_integration.rs
@jsturtevant
jsturtevant merged commit 773e444 into main Aug 21, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants