nodece commented on a change in pull request #13573:
URL: https://github.com/apache/pulsar/pull/13573#discussion_r780648067
##########
File path:
pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/PersistentTopicsTest.java
##########
@@ -1148,4 +1149,19 @@ 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 testResetCursorReturnTimeoutWhenZKTimeout() {
+ String topic = "persistent://"+testTenant + "/"+ testNamespace + "/" +
"topic-2";
+ BrokerService brokerService = spy(pulsar.getBrokerService());
+ doReturn(brokerService).when(pulsar).getBrokerService();
+ CompletableFuture<Optional<Topic>> completableFuture = new
CompletableFuture<>();
+
doReturn(completableFuture).when(brokerService).getTopicIfExists(topic);
+ try {
+ admin.topics().resetCursor(topic, "my-sub",
System.currentTimeMillis());
Review comment:
Add `fail` to next line.
--
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]