showuon commented on code in PR #12329:
URL: https://github.com/apache/kafka/pull/12329#discussion_r908276435


##########
core/src/test/scala/unit/kafka/server/AlterPartitionManagerTest.scala:
##########
@@ -178,6 +179,56 @@ class AlterPartitionManagerTest {
     assertEquals(request.data().topics().get(0).partitions().size(), 10)
   }
 
+  @Test
+  def testSubmitFromCallback(): Unit = {
+    // prepare a partition level retriable error response
+    val alterPartitionRespWithPartitionError = partitionResponse(tp0, 
Errors.UNKNOWN_SERVER_ERROR)
+    val errorResponse = 
makeClientResponse(alterPartitionRespWithPartitionError, 
ApiKeys.ALTER_PARTITION.latestVersion)
+
+    val leaderId = 1
+    val leaderEpoch = 1
+    val partitionEpoch = 10
+    val isr = List(1,2,3)
+    val leaderAndIsr = new LeaderAndIsr(leaderId,leaderEpoch, isr, 
LeaderRecoveryState.RECOVERED, partitionEpoch)

Review Comment:
   nice catch.



-- 
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: jira-unsubscr...@kafka.apache.org

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

Reply via email to