Repository navigation
Fix flaky HTTPX and Typhoeus instrument tests - #637
Merged
Merged
Conversation
Stub external HTTP with WebMock instead of hitting real services (news.ycombinator.com, google.com, httpbin.org, example.com), which caused intermittent failures from network/DNS/rate-limit variance. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The Ruby 4 instruments matrix uses instruments-ruby4.gemfile, which was missing webmock, so httpx_test failed to load. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
TyphoeusTest/HTTPXTest#setup overrode the base setup without calling super, so Thread.current[:scout_request] was never cleared. When a prior test left an open TrackedRequest on the thread, RequestManager.lookup reused it and the HTTP layer nested under the stale root instead of recording, causing intermittent "recorded no layers" failures dependent on test order/seed. Call super in setup/teardown to restore the reset. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
quinnmil
approved these changes
Sep 28, 2026
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 HTTPX and Typhoeus instrument tests made real network calls to third-party services (
news.ycombinator.com,google.com,httpbin.org,example.com), causing intermittent failures from network/DNS/rate-limit variance. A failed dispatch meant no layer was recorded, surfacing asExpected: 1, Actual: 0.Stub the endpoints with WebMock so every request dispatches deterministically through the instrumented method and the layer always records.
🤖 Generated with Claude Code