gaoran10 commented on a change in pull request #12312:
URL: https://github.com/apache/pulsar/pull/12312#discussion_r725652876



##########
File path: 
pulsar-broker/src/test/java/org/apache/pulsar/broker/transaction/buffer/TransactionLowWaterMarkTest.java
##########
@@ -164,9 +168,11 @@ public void testTransactionBufferLowWaterMark() throws 
Exception {
         field.setAccessible(true);
         field.set(txn, TransactionImpl.State.OPEN);
         producer.newMessage(txn).value(TEST2.getBytes()).send();
-
-        message = consumer.receive(2, TimeUnit.SECONDS);
-        assertNull(message);
+        try {
+            txn.commit().get();

Review comment:
       If this step should be failed, we need to add a fail check 
`Assert.fail("The commit operation should be failed.");` after the statement 
`txn.commit().get();`.

##########
File path: 
pulsar-broker/src/test/java/org/apache/pulsar/broker/transaction/buffer/TransactionLowWaterMarkTest.java
##########
@@ -164,9 +168,11 @@ public void testTransactionBufferLowWaterMark() throws 
Exception {
         field.setAccessible(true);
         field.set(txn, TransactionImpl.State.OPEN);
         producer.newMessage(txn).value(TEST2.getBytes()).send();
-
-        message = consumer.receive(2, TimeUnit.SECONDS);
-        assertNull(message);
+        try {
+            txn.commit().get();

Review comment:
       If this step should be failed, we need to add a fail check (such as 
`Assert.fail("The commit operation should be failed.");`) after the statement 
`txn.commit().get();`.




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


Reply via email to