congbobo184 commented on a change in pull request #12521:
URL: https://github.com/apache/pulsar/pull/12521#discussion_r744378008



##########
File path: 
pulsar-broker/src/test/java/org/apache/pulsar/client/impl/TransactionEndToEndTest.java
##########
@@ -757,12 +758,31 @@ public void produceAndConsumeCloseStateTxnTest() throws 
Exception {
             timeoutTxn.commit().get();
             fail();
         } catch (Exception e) {
-            assertTrue(e.getCause() instanceof TransactionNotFoundException);
+            assertTrue(e.getCause() instanceof 
TransactionCoordinatorClientException.InvalidTxnStatusException);
         }
         Field field = TransactionImpl.class.getDeclaredField("state");
         field.setAccessible(true);
         TransactionImpl.State state = (TransactionImpl.State) 
field.get(timeoutTxn);
-        assertEquals(state, TransactionImpl.State.ERROR);
+        assertEquals(state, TransactionImpl.State.TIMEOUT);

Review comment:
       please don't change this test, we should check the TC timeout, so return 
State.ERROR

##########
File path: 
pulsar-broker/src/test/java/org/apache/pulsar/client/impl/ConsumerAckResponseTest.java
##########
@@ -50,6 +51,8 @@ public void setup() throws Exception {
         super.producerBaseSetup();
         doReturn(1L).when(transaction).getTxnIdLeastBits();
         doReturn(1L).when(transaction).getTxnIdMostBits();
+        doReturn(new TxnID(1L, 1L)).when(transaction).getTxnID();

Review comment:
       why add this logic




-- 
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: commits-unsubscr...@pulsar.apache.org

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


Reply via email to