junrao commented on code in PR #16893:
URL: https://github.com/apache/kafka/pull/16893#discussion_r1718953516
##########
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:
@chia7712 : Good idea. We probably don't need an IT. We could just use the
latest production MV like the following.
```
public void test() {
MetadataVersion mv = MetadataVersion.latestProduction()
Assertions.assertTrue(mv.listOffsetRequestVersion() <=
ApiKeys.LIST_OFFSETS.latestVersion(false));
Assertions.assertTrue(mv.fetchRequestVersion() <=
ApiKeys.FETCH.latestVersion(false));
Assertions.assertTrue(mv.offsetForLeaderEpochRequestVersion() <=
ApiKeys.OFFSET_FOR_LEADER_EPOCH.latestVersion(false));
});
}
```
--
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]