This is an automated email from the ASF dual-hosted git repository.
lhotari pushed a commit to branch branch-2.11
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/branch-2.11 by this push:
new 0cf5a837512 [fix][test] testModularLoadManagerRemoveBundleAndLoad
(#19710)
0cf5a837512 is described below
commit 0cf5a83751217e1e15988945227ae94f79d1e777
Author: houxiaoyu <[email protected]>
AuthorDate: Mon Mar 6 12:48:41 2023 +0800
[fix][test] testModularLoadManagerRemoveBundleAndLoad (#19710)
(cherry picked from commit 4ed8a871bfa9a7a8e30d86d782e33a556646d7b1)
# Conflicts:
#
pulsar-broker/src/test/java/org/apache/pulsar/broker/namespace/NamespaceServiceTest.java
---
.../org/apache/pulsar/broker/namespace/NamespaceServiceTest.java | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
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 fe3976c6d1d..b0a1dc555fb 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,7 +42,7 @@ import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
@@ -827,11 +827,9 @@ public class NamespaceServiceTest extends BrokerTestBase {
// Wait until "ModularLoadManager" completes processing the ZK
notification.
ModularLoadManagerWrapper modularLoadManagerWrapper =
(ModularLoadManagerWrapper) loadManager;
ModularLoadManagerImpl modularLoadManager = (ModularLoadManagerImpl)
modularLoadManagerWrapper.getLoadManager();
- ScheduledExecutorService scheduler =
Whitebox.getInternalState(modularLoadManager, "scheduler");
+ ExecutorService executors =
Whitebox.getInternalState(modularLoadManager, "executors");
CompletableFuture<Void> waitForNoticeHandleFinishByLoadManager = new
CompletableFuture<>();
- scheduler.execute(() -> {
- waitForNoticeHandleFinishByLoadManager.complete(null);
- });
+ executors.execute(() ->
waitForNoticeHandleFinishByLoadManager.complete(null));
waitForNoticeHandleFinishByLoadManager.join();
// Manually trigger "LoadResourceQuotaUpdaterTask"
loadManager.writeResourceQuotasToZooKeeper();