Add comprehensive unit tests for HTTP client actions and utilities#17
Merged
Add comprehensive unit tests for HTTP client actions and utilities#17
Conversation
…TTP actions Add comprehensive unit test coverage for previously untested classes: - UrlUtils: URL encoding and joining with special characters, null handling - Node: availability state, URL construction, thread safety - NodeIterator: round-robin iteration, boundary handling, NoSuchElementException - HttpAction: media type detection, active shard count serialization, exception unwrapping - HttpBulkAction: NDJSON request serialization, bulk response parsing with failures - HttpSearchAction: query source serialization for various query types - HttpIndexAction/HttpDeleteAction: response parsing for CRUD operations - HttpGetAction: basic construction verification - HttpCreateIndexRequest: mapping preparation and delegation pattern https://claude.ai/code/session_014opUrsabrAZEr3Ck3m8kAe
SearchRequest initializes with a default SearchSourceBuilder, so
getQuerySource returns "{}" instead of null. Updated test to match
actual behavior.
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
This PR adds extensive unit test coverage for the HTTP client implementation, including tests for action handlers, node management, and URL utilities. The test suite covers core functionality such as media type handling, bulk operations, search queries, index creation, and node availability management.
Key Changes
Notable Implementation Details