feat: enhance OData observability and test utilities - #1265
Open
rudramadhab22 wants to merge 2 commits into
Open
feat: enhance OData observability and test utilities#1265rudramadhab22 wants to merge 2 commits into
rudramadhab22 wants to merge 2 commits into
Conversation
- Enhanced ODataRequestListener with hooks for HTTP responses and execution duration. - Implemented performance tracking for OData requests. - Ensured all listener hooks are invoked during the request and parsing lifecycle. - Added RequestHeaderContext to test utilities for easier mocking of request headers. - Updated TestContext to implement RequestHeaderContext. - Added unit tests for new observability features and test utility extensions.
- Enhanced ODataRequestListener with hooks for HTTP responses and execution duration. - Implemented performance tracking for OData requests by measuring and reporting execution time. - Ensured all listener hooks (request, response, error, parsing) are correctly invoked during the OData request lifecycle. - Introduced RequestHeaderContext to test utilities to simplify mocking and verification of request headers. - Updated TestContext to implement RequestHeaderContext for improved developer experience in unit tests. - Added comprehensive unit tests for new observability features and test utility extensions. - Fixed PMD static analysis violations regarding field declaration ordering.
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.
Description
This PR enhances the OData observability mechanism and extends the test utilities to support advanced connectivity testing.
Key Changes:
listenOnResponseandlistenOnExecutionFinishedhooks to theODataRequestListenerinterface.listenOnRequestError,listenOnParsingError) were defined but never actually invoked in the execution flow.RequestHeaderContextto simplify the mocking and verification ofRequestHeaderContainerin unit tests.TestContextto implement the new interface, allowing developers to set/clear request headers fluently in their test setups.Context
SAP/cloud-sdk-java-backlog#ISSUENUMBER.
These changes were needed to provide better insights into OData request execution (performance and outcome) and to lower the barrier for writing tests that involve complex request header scenarios.
Feature scope:
ODataRequestListenerwith response and timing hooksRequestHeaderContexttotestutilDefinition of Done
Documentation updatedRelease notes updated