Repository navigation
test: use modern Go testing APIs - #97
Merged
Merged
Conversation
- Use t.Context() in timeout and response-writer tests, preserving request deadlines and concurrency assertions.
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
Related issues
N/A — no GitHub or Jira issue supplied.
AI authorship
timeout_test.go,writer_test.go.Change classification
Leaf — tests and/or isolated examples. One reviewer recommended.
Plan reference
Apply Modern Go Guidelines for the existing Go 1.26.10 module version; preserve public APIs, dependency versions, and established behavior except the explicitly described wrapped-cache-miss logging fix.
Verification
From a checkout of
6702e0a3f8eab41b32424ae1d1c312c8034cfb3a(refactor/modern-go-guidelines), use the repository root, Go 1.26.10, andgo mod download.make fmtmake lintgo test -race -count=1 -timeout=180s ./...git diff --check(cd _example/example01 && go test ./...)(cd _example/example02 && go test ./...)(cd _example/example03 && go test ./...)(cd _example/example04 && go test ./...)Behavioral verification
Execution: Passed for the automated suite; human line-by-line review is pending. Tests use temporary fixtures; no production state is required.
Evidence
Web screenshots: N/A — no UI changed.
Performance: N/A — test lifecycle or example-only refactoring, with no performance claim.
Security and risk
No secrets or dependency changes in the diff. Runtime library behavior is unchanged. Revert this commit to roll back.
Reviewer guide
Review the Summary substitutions and AI-authored files above. One reviewer; check that helper arguments preserve the originating test context. Any performance evidence marked Not run remains unverified; no speed claim is made.