peterzdhuang opened a new pull request, #22667:
URL: https://github.com/apache/kafka/pull/22667
KAFKA-19738 asks to improve `OffsetsRequestManager` test coverage to better
match `OffsetFetcher`. This adds coverage for ListOffsets request
construction
and retry routing, which were previously untested:
- `testListOffsetsRequestSendsIsolationLevel` — verifies the configured
`IsolationLevel` is carried on the outgoing `ListOffsetsRequest`.
Parameterized
over both `READ_COMMITTED` and `READ_UNCOMMITTED`.
- `testListOffsetsRequestSendsTargetTimestamp` — verifies the caller's target
timestamp is carried on the request. Parameterized over
`EARLIEST_TIMESTAMP`
and `LATEST_TIMESTAMP`.
- `testListOffsetsRetriedToNewLeaderAfterMetadataUpdate` — verifies that
when a
partition's leader changes after a retriable error
(`NOT_LEADER_OR_FOLLOWER`)
triggers a metadata update, the retried request is routed to the new leader
rather than the stale one.
These are state-based assertions on the built request object, consistent with
the existing tests in this class.
### Testing
All tests in `OffsetsRequestManagerTest` pass. `checkstyleTest` and
`spotlessJavaCheck` pass.
--
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]