Test/reqresp v1 coverage#69
Merged
samcm merged 3 commits intofeat/per-protocol-encodingfrom Jul 4, 2025
Merged
Conversation
- Add tests for client.go covering SendRequest, retry logic, timeouts, and chunked requests - Add tests for handler.go covering request handling, validation, and error responses - Add tests for chunked_handler.go covering chunked responses and ChunkedResponseWriter - Add tests for reqresp.go covering service lifecycle and concurrent operations - Add tests for types.go covering Status, error constants, and configurations - Create comprehensive mock implementations for host.Host, network.Stream, and other interfaces - Achieve 72.6% test coverage, exceeding the >70% target Test coverage breakdown: - client.go: High coverage for core functionality - handler.go: Excellent coverage (94.7% for HandleStream) - chunked_handler.go: Excellent coverage (95% for HandleStream) - types.go: 100% coverage for key functions - reqresp.go: Good coverage for service operations
- Add unit tests for all major components - Add mock implementations for libp2p interfaces - Add panic recovery to handlers for robustness - Add proper timeout handling with context - Fix empty request validation - Fix integration test race conditions - All tests now pass successfully Coverage highlights: - Total package: 77.9% - Handler.HandleStream: 94.7% - ChunkedHandler.HandleStream: 95.0% - Client.SendRequestWithOptions: 95.5% 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
- Add blank line before return statements (nlreturn) - Add blank line before if statements after assignments (wsl) - All linting issues now resolved 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feat/per-protocol-encoding #69 +/- ##
=============================================================
Coverage ? 42.73%
=============================================================
Files ? 65
Lines ? 6657
Branches ? 0
=============================================================
Hits ? 2845
Misses ? 3516
Partials ? 296 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
No description provided.