You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/09/14 14:18:52 UTC

[GitHub] [pulsar] HQebupt commented on a diff in pull request #17315: [improve][broker]prevent partitioned metadata lookup request when broker is closing

HQebupt commented on code in PR #17315:
URL: https://github.com/apache/pulsar/pull/17315#discussion_r970873551


##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ServerCnxTest.java:
##########
@@ -2307,4 +2308,21 @@ public void handleConnectWithServiceNotReady() throws Exception {
         assertEquals(error.getError(), ServerError.ServiceNotReady);
         channel.finish();
     }
+
+    @Test(timeOut = 30000)
+    public void handlePartitionMetadataRequestWithServiceNotReady() throws Exception {
+        resetChannel();
+        setChannelConnected();
+        CompletableFuture<Boolean> successFuture = CompletableFuture.completedFuture(true);
+        doReturn(successFuture).when(namespaceService).checkTopicExists(any(TopicName.class));

Review Comment:
   No. It will make the test case more complex. I think it's not worth 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: commits-unsubscribe@pulsar.apache.org

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