Skip to content

Commit 4ed8a87

Browse files
authored
[fix][test] testModularLoadManagerRemoveBundleAndLoad (apache#19710)
1 parent e13865c commit 4ed8a87

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pulsar-broker/src/test/java/org/apache/pulsar/broker/namespace/NamespaceServiceTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
import java.util.Optional;
4646
import java.util.Set;
4747
import java.util.concurrent.CompletableFuture;
48-
import java.util.concurrent.ScheduledExecutorService;
48+
import java.util.concurrent.ExecutorService;
4949
import java.util.concurrent.TimeUnit;
5050
import java.util.concurrent.atomic.AtomicReference;
5151
import lombok.Cleanup;
@@ -823,10 +823,10 @@ private void waitResourceDataUpdateToZK(LoadManager loadManager) throws Exceptio
823823
// Wait until "ModularLoadManager" completes processing the ZK notification.
824824
ModularLoadManagerWrapper modularLoadManagerWrapper = (ModularLoadManagerWrapper) loadManager;
825825
ModularLoadManagerImpl modularLoadManager = (ModularLoadManagerImpl) modularLoadManagerWrapper.getLoadManager();
826-
ScheduledExecutorService scheduler = (ScheduledExecutorService) FieldUtils.readField(
827-
modularLoadManager, "scheduler", true);
826+
ExecutorService executors = (ExecutorService) FieldUtils.readField(
827+
modularLoadManager, "executors", true);
828828
CompletableFuture<Void> waitForNoticeHandleFinishByLoadManager = new CompletableFuture<>();
829-
scheduler.execute(() -> waitForNoticeHandleFinishByLoadManager.complete(null));
829+
executors.execute(() -> waitForNoticeHandleFinishByLoadManager.complete(null));
830830
waitForNoticeHandleFinishByLoadManager.join();
831831
// Manually trigger "LoadResourceQuotaUpdaterTask"
832832
loadManager.writeResourceQuotasToZooKeeper();

0 commit comments

Comments
 (0)