Fix flaky HTTPS integration test - #191
Merged
Merged
Conversation
Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
jsturtevant
force-pushed
the
jsturtevant-fix-http-ci-flake
branch
from
August 18, 2026 19:47
b877499 to
28aac9d
Compare
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.