dengziming commented on a change in pull request #10389:
URL: https://github.com/apache/kafka/pull/10389#discussion_r600079948



##########
File path: core/src/test/scala/unit/kafka/server/ListOffsetsRequestTest.scala
##########
@@ -139,10 +139,17 @@ class ListOffsetsRequestTest extends BaseRequestTest {
 
     val request = if (version == -1) builder.build() else 
builder.build(version)
 
-    val response = sendRequest(serverId, request)
-    val partitionData = response.topics.asScala.find(_.name == topic).get
+    sendRequest(serverId, request).topics.asScala.find(_.name == topic).get
       .partitions.asScala.find(_.partitionIndex == partition.partition).get
+  }
 
+  // -1 indicate "latest"
+  private[this] def fetchOffsetAndEpoch(serverId: Int,
+                                        timestamp: Long,
+                                        version: Short): (Long, Int) = {
+    val partitionData = sendRequest(serverId, timestamp, version)
+
+    println(s"[CHIA] fetchOffsetAndEpoch version: $version partitionData: 
$partitionData")

Review comment:
       nit: this is checked in by accident?

##########
File path: core/src/test/scala/unit/kafka/server/ListOffsetsRequestTest.scala
##########
@@ -166,6 +176,9 @@ class ListOffsetsRequestTest extends BaseRequestTest {
     // Kill the first leader so that we can verify the epoch change when 
fetching the latest offset
     killBroker(firstLeaderId)
     val secondLeaderId = TestUtils.awaitLeaderChange(servers, partition, 
firstLeaderId)
+    // make sure high watermark of new leader has not caught up

Review comment:
       should this be "has caught up"




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to