Repository navigation
Test that a server which never answers costs one report, not the sender - #29
Merged
Merged
Conversation
Each request is bounded by TIMEOUT_SECONDS; nothing asserted it. A server that accepts the connection and hangs must time out that report, log it at DEBUG, and leave the sender free to deliver the next one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric (one pass, anchored on CI run 41180910676):
Judgment call for a reader: the 10 s polling deadline is twice the default timeout and twenty times the patched one, so it should be generous enough for a slow runner. Patching the class attribute does not change This comment was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
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.
Summary
_send, which no existing test asserted.test_a_server_that_never_answers_costs_one_report_not_the_sendershortensTraceClient.TIMEOUT_SECONDSto 0.5 s, holds the loopback server's first request unanswered, and checks three things: the hung request is logged ascould not deliver, the next report is still delivered, and every log record is atDEBUG.urlopentimeout would have passed the suite. The existing hang test only boundsclose(), not the sender.Test plan
python3 -m unittest -vlocally (Python 3.8.10):Ran 68 tests,OKurlopen(..., timeout=30)in place ofself.TIMEOUT_SECONDS, the new test failed (FAILED (failures=1)); with the source restored, it passedtest (3.8),test (3.10),test (3.12)greenDeferred
tags"always holds at leastversion" holds at theMAX_TAGScap, and the change has to land together with trace-client-java.Java parity
No Java-visible behavior changed. This adds a test only.
No tracking issue: the gap was found during triage.
This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).
🤖 Generated with Claude Code
drafted by Claude on behalf of Daniel Stephenson