Copilot commented on code in PR #7860:
URL: https://github.com/apache/incubator-seata/pull/7860#discussion_r2616902212


##########
extensions/messaging/seata-rocketmq/src/test/java/org/apache/seata/integration/rocketmq/SeataMQProducerTest.java:
##########
@@ -361,6 +361,18 @@ void testDoSendMessageInTransactionWithTransactionId() 
throws Exception {
         verify(seataMQProducer).superSend(msg, timeout);
     }
 
+    @Test
+    void testDoSendMessageInTransactionWithDelayLevel() {
+        Message msg = new Message("testTopic", "testBody".getBytes());
+        msg.setDelayTimeLevel(1);
+        long timeout = 3000L;
+        String xid = "testXid";
+        long branchId = 123L;
+
+        assertThrows(
+                MQClientException.class, () -> 
seataMQProducer.doSendMessageInTransaction(msg, timeout, xid, branchId));

Review Comment:
   The test should verify the exception message to ensure the correct error is 
being thrown. Consider capturing the thrown exception and asserting that its 
message matches "Message delay time level is not supported in Seata 
transaction". This would make the test more robust and ensure the error message 
provides clear feedback to users.



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