sjhajharia opened a new pull request, #20164:
URL: https://github.com/apache/kafka/pull/20164
### Background
As part of KIP-932 implementation, ShareFetch requests need to properly
integrate with Kafka's quota system. This requires that ShareFetch requests
extract and pass the correct session information (Principal, client address,
client ID) to quota managers, ensuring consistent quota enforcement between
ShareFetch and traditional Fetch requests.
### Changes
This PR adds `testHandleShareFetchRequestQuotaTagsVerification()` to
`KafkaApisTest`, which provides verification of quota tag extraction and
session handling for ShareFetch requests.
- Ensures ShareFetch requests are properly constructed with the correct
client ID, principal, client address, and API key
- Verifies the request context contains the expected session information
- Uses `ArgumentCaptor` to capture the exact `Session` and
`RequestChannel.Request` objects passed to quota managers
- Verifies both `quotas.fetch.maybeRecordAndGetThrottleTimeMs()` and
`quotas.request.maybeRecordAndGetThrottleTimeMs()` are called with correct
parameters
- Validates that the captured `RequestChannel.Request` object maintains
the correct request context information
- Ensures the client ID passed to quota managers matches the test-defined
value
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]