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

houxiaoyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 007129b78d9 [fix][test] Fix ConcurrentModificationException in 
testConcurrentWriteBrokerData (#18418)
007129b78d9 is described below

commit 007129b78d933dc2bd1a23e4dff36b87705cb04d
Author: houxiaoyu <[email protected]>
AuthorDate: Fri Nov 18 12:00:03 2022 +0800

    [fix][test] Fix ConcurrentModificationException in 
testConcurrentWriteBrokerData (#18418)
---
 .../java/org/apache/pulsar/client/api/BrokerServiceLookupTest.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/BrokerServiceLookupTest.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/BrokerServiceLookupTest.java
index 6b6d9a321ca..53da4407362 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/BrokerServiceLookupTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/BrokerServiceLookupTest.java
@@ -217,10 +217,10 @@ public class BrokerServiceLookupTest extends 
ProducerConsumerBase {
         @Cleanup("shutdownNow")
         ExecutorService executor = Executors.newFixedThreadPool(10);
         List<Future<?>> list = new ArrayList<>();
+        LocalBrokerData data = 
loadManager.getLoadManager().updateLocalBrokerData();
+        data.cleanDeltas();
+        data.getBundles().clear();
         for (int i = 0; i < 1000; i++) {
-            LocalBrokerData data = 
loadManager.getLoadManager().updateLocalBrokerData();
-            data.cleanDeltas();
-            data.getBundles().clear();
             list.add(executor.submit(() -> {
                 try {
                     assertNotNull(loadManager.generateLoadReport());

Reply via email to