You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by xy...@apache.org on 2022/08/05 18:53:07 UTC

[pulsar] 05/08: Fix the compilation error when cherry-picking cdec98a

This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch branch-2.8
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit 71076570b4bc3af30dd5da6b918f1ea232d92afb
Author: Zixuan Liu <no...@gmail.com>
AuthorDate: Thu Aug 4 15:44:28 2022 +0800

    Fix the compilation error when cherry-picking cdec98a
---
 .../apache/pulsar/broker/auth/AuthorizationWithAuthDataTest.java | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/auth/AuthorizationWithAuthDataTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/auth/AuthorizationWithAuthDataTest.java
index ccb401f74b3..7476eb37da7 100644
--- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/auth/AuthorizationWithAuthDataTest.java
+++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/auth/AuthorizationWithAuthDataTest.java
@@ -25,6 +25,7 @@ import io.jsonwebtoken.SignatureAlgorithm;
 import java.io.IOException;
 import java.nio.charset.StandardCharsets;
 import java.util.Base64;
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.Set;
 import java.util.UUID;
@@ -38,6 +39,7 @@ import org.apache.pulsar.broker.authentication.AuthenticationDataSource;
 import org.apache.pulsar.broker.authentication.AuthenticationProviderToken;
 import org.apache.pulsar.broker.authentication.utils.AuthTokenUtils;
 import org.apache.pulsar.broker.authorization.AuthorizationProvider;
+import org.apache.pulsar.broker.cache.ConfigurationCacheService;
 import org.apache.pulsar.client.admin.PulsarAdminBuilder;
 import org.apache.pulsar.client.admin.PulsarAdminException;
 import org.apache.pulsar.client.api.ClientBuilder;
@@ -96,6 +98,11 @@ public class AuthorizationWithAuthDataTest extends MockedPulsarServiceBaseTest {
             return CompletableFuture.completedFuture(true);
         }
 
+        @Override
+        public void initialize(ServiceConfiguration conf, ConfigurationCacheService configCache) throws IOException {
+            // No ops
+        }
+
         @Override
         public CompletableFuture<Boolean> canProduceAsync(TopicName topicName, String role,
                                                           AuthenticationDataSource authenticationData) {
@@ -262,7 +269,7 @@ public class AuthorizationWithAuthDataTest extends MockedPulsarServiceBaseTest {
     @Test
     public void testAdmin() throws PulsarAdminException {
         admin.tenants().createTenant("test-tenant-1",
-                TenantInfo.builder().allowedClusters(Set.of(configClusterName)).build());
+                TenantInfo.builder().allowedClusters(Collections.singleton(configClusterName)).build());
         admin.namespaces().createNamespace("test-tenant-1/test-namespace-1");
         String partitionedTopic = UUID.randomUUID().toString();
         admin.topics().createPartitionedTopic(partitionedTopic,3);