3pacccccc commented on code in PR #25036:
URL: https://github.com/apache/pulsar/pull/25036#discussion_r2587281307
##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/transaction/TransactionTest.java:
##########
@@ -330,6 +331,21 @@ public void testCreateTransactionSystemTopic() throws
Exception {
assertEquals(e.getMessage(), "Cannot create topic in system topic
format!");
}
}
+ @Test(timeOut = 10000)
+ public void testAckTnxWithNullMessageId() throws Exception {
+ final String topic =
BrokerTestUtil.newUniqueName("persistent://tnx/ns1/testAckTnxWithNullMessageId");
+ @Cleanup final Consumer<String> consumer =
pulsarClient.newConsumer(Schema.STRING)
+ .topic(topic)
+ .subscriptionName("sub1")
+ .subscribe();
+ List<MessageId> messageIdList = null;
+ assertThatThrownBy(
+ () -> consumer.acknowledgeAsync(messageIdList, null).get()
Review Comment:
> Oh I see the 1st argument is also null.
>
> I think you can just put all `acknowledge` tests into a single test method
because there are many overloads.
OK, thanks for the suggestion, that's make sense, I'll do it.
--
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]