nodece commented on a change in pull request #13573:
URL: https://github.com/apache/pulsar/pull/13573#discussion_r778566445
##########
File path:
pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/PersistentTopicsTest.java
##########
@@ -1148,4 +1149,18 @@ public void testAdminTerminatePartitionedTopic() throws
Exception{
Assert.assertEquals(e.getMessage(), "Termination of a
non-partitioned topic is not allowed using partitioned-terminate, please use
terminate commands.");
}
}
+
+ @Test
+ public void testTopicReferenceCommonExceptionWillReturnRestException() {
+ String topicName = "topicName";
+ String exceptionDetail = "exceptionDetail";
+ doThrow(new
RuntimeException(exceptionDetail)).when(pulsar).getBrokerService();
Review comment:
You should `when` the `pulsar().getBrokerService().getTopicIfExists()`,
and return a not complete completableFuture, and call the reset-cursor API on a
non-exist topic.
--
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]