From 0351af1e9766e17e80b9c7a443c614cf821777bb Mon Sep 17 00:00:00 2001 From: Zixuan Liu Date: Tue, 23 Jul 2024 21:15:23 +0800 Subject: [PATCH] Fix test Signed-off-by: Zixuan Liu --- .../apache/pulsar/broker/namespace/NamespaceServiceTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/namespace/NamespaceServiceTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/namespace/NamespaceServiceTest.java index 8e8c6a29e70b0..8538a3ee8d768 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/namespace/NamespaceServiceTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/namespace/NamespaceServiceTest.java @@ -42,6 +42,7 @@ import java.util.Optional; import java.util.Set; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutorService; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import lombok.Cleanup; @@ -819,7 +820,7 @@ private void waitResourceDataUpdateToZK(LoadManager loadManager) throws Exceptio // Wait until "ModularLoadManager" completes processing the ZK notification. ModularLoadManagerWrapper modularLoadManagerWrapper = (ModularLoadManagerWrapper) loadManager; ModularLoadManagerImpl modularLoadManager = (ModularLoadManagerImpl) modularLoadManagerWrapper.getLoadManager(); - ScheduledExecutorService scheduler = Whitebox.getInternalState(modularLoadManager, "scheduler"); + ExecutorService scheduler = Whitebox.getInternalState(modularLoadManager, "executors"); CompletableFuture waitForNoticeHandleFinishByLoadManager = new CompletableFuture<>(); scheduler.execute(() -> { waitForNoticeHandleFinishByLoadManager.complete(null);