codelipenghui commented on code in PR #15361:
URL: https://github.com/apache/pulsar/pull/15361#discussion_r860440516


##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/transaction/TopicTransactionBufferRecoverTest.java:
##########
@@ -486,7 +486,7 @@ public void 
testTransactionBufferRecoverThrowPulsarClientException() throws Exce
         TransactionBufferSnapshotService 
transactionBufferSnapshotServiceOriginal =
                 (TransactionBufferSnapshotService) 
field.get(getPulsarServiceList().get(0));
         // mock reader can't read snapshot fail
-        doThrow(new 
PulsarClientException("test")).when(reader).hasMoreEvents();
+        doThrow(new RuntimeException("test")).when(reader).hasMoreEvents();

Review Comment:
   ```suggestion
           doThrow(new Exception("test")).when(reader).hasMoreEvents();
   ```
   
   PulsarClientException is not a RuntimeException, If use RuntimeException 
here, we will lose the previous test coverage.



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