github-actions[bot] commented on code in PR #61881:
URL: https://github.com/apache/doris/pull/61881#discussion_r3128938023


##########
fe/fe-core/src/test/java/org/apache/doris/cloud/transaction/CloudGlobalTransactionMgrTest.java:
##########
@@ -410,4 +422,15 @@ public void testGetNextTransactionId() throws Exception {
             Assert.assertEquals(1000, result);
         }
     }
+
+    private TxnInfoPB buildTxnInfo(long transactionId) {
+        return TxnInfoPB.newBuilder()
+                .setDbId(CatalogTestUtil.testDbId1)
+                
.addAllTableIds(Lists.newArrayList(CatalogTestUtil.testTableId1))
+                .setTxnId(transactionId)
+                .setLabel(CatalogTestUtil.testTxnLabel1)
+                .setListenerId(0L)

Review Comment:
   These new tests still do not exercise the callback handoff that the 
production fix depends on. `handleBeforeAbort()` only resolves a callback when 
the transaction state carries a real non-zero `listenerId`, but 
`buildTxnInfo()` hardcodes `.setListenerId(0L)`, so 
`callbackFactory.getCallback(callbackId)` is always `null` here. Combined with 
the success `AbortTxnResponse` mocks also omitting `txn_info`, both abort tests 
can pass without ever invoking `beforeAborted()` or `afterAborted()`.
   
   Please register a mock callback with a matching non-zero listener id and 
return `txn_info` from the successful abort response, so these tests actually 
cover the BE-restart callback path.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to