From 8140c3a060390fc27684deac82e05db4fb740e70 Mon Sep 17 00:00:00 2001 From: mattisonchao Date: Wed, 26 Jul 2023 01:19:11 +0800 Subject: [PATCH] Fix test --- .../pulsar/broker/lookup/http/HttpTopicLookupv2Test.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/lookup/http/HttpTopicLookupv2Test.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/lookup/http/HttpTopicLookupv2Test.java index 5ae6076274826..5906c6f4fe216 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/lookup/http/HttpTopicLookupv2Test.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/lookup/http/HttpTopicLookupv2Test.java @@ -142,6 +142,9 @@ public void testLookupTopicNotExist() throws Exception { doReturn(uri).when(uriInfo).getRequestUri(); doReturn(true).when(config).isAuthorizationEnabled(); + BrokerService brokerService = pulsar.getBrokerService(); + doReturn(CompletableFuture.completedFuture(false)) + .when(brokerService).isAllowAutoTopicCreationAsync(any()); NamespaceService namespaceService = pulsar.getNamespaceService(); CompletableFuture future = new CompletableFuture<>(); future.complete(false);