junrao commented on code in PR #16873:
URL: https://github.com/apache/kafka/pull/16873#discussion_r1717243732


##########
core/src/test/scala/unit/kafka/server/KafkaApisTest.scala:
##########
@@ -10100,6 +10110,31 @@ class KafkaApisTest extends Logging {
     verifyNoThrottling[MetadataResponse](requestChannelRequest)
   }
 
+  private def testConsumerListOffsetWithUnsupportedVersion(timestamp: Long, 
version: Short): Unit = {
+    val tp = new TopicPartition("foo", 0)
+    val targetTimes = List(new ListOffsetsTopic()
+      .setName(tp.topic)
+      .setPartitions(List(new ListOffsetsPartition()
+        .setPartitionIndex(tp.partition)
+        .setTimestamp(timestamp)).asJava)).asJava
+
+    val listOffsetRequest = ListOffsetsRequest.Builder
+      .forConsumer(false, IsolationLevel.READ_UNCOMMITTED, false, false)
+      .setTargetTimes(targetTimes).build(version)

Review Comment:
   With https://github.com/apache/kafka/pull/16876, we can't build an incorrect 
request like that, right?



-- 
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]

Reply via email to