guozhangwang commented on a change in pull request #8782:
URL: https://github.com/apache/kafka/pull/8782#discussion_r434173517



##########
File path: 
core/src/test/scala/unit/kafka/coordinator/transaction/TransactionMarkerChannelManagerTest.scala
##########
@@ -291,7 +358,7 @@ class TransactionMarkerChannelManagerTest {
 
     val response = new WriteTxnMarkersResponse(createPidErrorMap(Errors.NONE))
     for (requestAndHandler <- requestAndHandlers) {
-      requestAndHandler.handler.onComplete(new ClientResponse(new 
RequestHeader(ApiKeys.PRODUCE, 0, "client", 1),
+      requestAndHandler.handler.onComplete(new ClientResponse(new 
RequestHeader(ApiKeys.WRITE_TXN_MARKERS, 0, "client", 1),

Review comment:
       Nice catch. Not sure why they did not fail before :)

##########
File path: 
core/src/test/scala/unit/kafka/coordinator/transaction/TransactionMarkerChannelManagerTest.scala
##########
@@ -86,6 +90,70 @@ class TransactionMarkerChannelManagerTest {
       .anyTimes()
   }
 
+  @Test
+  def shouldOnlyWriteTxnCompletionOnce(): Unit = {

Review comment:
       Does this test cover concurrent calls to `maybeWriteTxnCompletion`?




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