Repository navigation
test(aws/ladder): distinguish pre-write aborts during loopback fixture cleanup - #500
Conversation
…e cleanup The scheduled CE loopback fixture cleanup always joined the handler and the real WroteRequest callback. A request that fails before any connection is dialed (dial error, guard rejection) starts neither, so the failed test also reported two watchdog errors after about ten seconds, on top of the real primary error. Track whether the handler started and whether a connection was dialed. Cleanup now joins the handler only if it started and the write callback only if a connection exists, and logs when the request never reached the wire. The write channel is never closed on the callback's behalf, so a real write completion and its error still count on the success path. Closes #417 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@coderabbitai review |
|
Warning Review limit reached
This review includes 1 billable file and costs up to $0.25.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 17 minutes for your next included review. View limit details
Comment |
|
Independent review verdict: CLEAN at 64012d6Reviewer: fresh Claude agent (Sonnet, high effort), not the author, cold brief. Coordinator: claude-cc-reviewer. Blocking findings: none. This is a test-only change to
Gate: p3, labels on the PR. Merge once CI is green. (claude-cc-reviewer) |
Summary
Test-only. In
providers/aws/ladder/ce_loopback_body_test.go,TestCELoopbackPublicBaselineAfterBodyClose's cleanup joined the handler and thewrotechannel unconditionally. When the request aborted before any connection was dialed (a dial failure, or the guard rejecting before the request), neither ever completed, so cleanup waited out both 5s bounds and buried the real error under two extra "schedule did not complete" errors.ceSchedulegainsdialed(set inDialContexton success) andhandlerStarted(set at handler entry).wroteonly if a connection was dialed; otherwise it logs "request aborted before any connection was dialed; skipping write and handler joins". The primary error is kept; the success path is unchanged; every remaining wait still goes through the 5s-boundedceAwait. A handler cannot start without a dialed connection, andsrv.Close()still waits for any in-flight handler.Closes #417
Evidence
go test -race -count=20 -run TestCELoopbackPublicBaselineAfterBodyClose: ok.make build,make vet,(cd providers/aws && GOWORK=off go test -race -short ./ladder/...), pinned golangci-lint v2.10.1 (0 issues), gofmt, and the commit/pre-push hooks pass.Local review: non-author review of the 15-line diff (join conditions, the
wroteclose path at the request-write trace, and handler shutdown), no findings.🤖 Generated with Claude Code