junrao commented on code in PR #16893:
URL: https://github.com/apache/kafka/pull/16893#discussion_r1718996395
##########
core/src/test/scala/unit/kafka/server/ListOffsetsRequestTest.scala:
##########
@@ -202,7 +210,17 @@ class ListOffsetsRequestTest extends BaseRequestTest {
@ParameterizedTest
@ValueSource(strings = Array("zk", "kraft"))
- def testResponseIncludesLeaderEpoch(quorum: String): Unit = {
+ def testResponseIncludesLeaderEpochWithUnstableAPIs(quorum: String): Unit = {
+ testResponseIncludesLeaderEpoch()
+ }
+
+ @ParameterizedTest
+ @ValueSource(strings = Array("zk", "kraft"))
+ def testResponseIncludesLeaderEpochWithStableAPIs(quorum: String): Unit = {
+ testResponseIncludesLeaderEpoch()
+ }
+
+ def testResponseIncludesLeaderEpoch(): Unit = {
Review Comment:
`TransactionMarkerChannelManager` sets the version for
`WriteTxnMarkersRequest` based on MV in the following code in
`TransactionMarkerChannelManager`. It would be useful to move that logic to
MetadataVersion and add a similar test on unstable version. This could be done
in a separate PR if it requires more work.
```
private val writeTxnMarkersRequestVersion: Short =
if (config.interBrokerProtocolVersion.isAtLeast(IBP_2_8_IV0)) 1
else 0
```
--
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]