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

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

commit c9035ea62f5cea41a1a461da49f0bbe94265bc32
Author: lipenghui <[email protected]>
AuthorDate: Wed Jan 8 17:41:17 2020 +0800

    Fix unit test (#6006)
    
    ### Motivation
    
    Since #5599 merged, it introduce some conflict code with master branch, 
maybe the reason is #5599 not rebase with master
    
    ### Verifying this change
    
    This is a test change
---
 .../test/java/org/apache/pulsar/broker/service/BrokerServiceTest.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerServiceTest.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerServiceTest.java
index 8a6f443..505038b 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerServiceTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerServiceTest.java
@@ -946,9 +946,9 @@ public class BrokerServiceTest extends BrokerTestBase {
                 .get(mlFactory);
         assertNotNull(ledgers.get(topicMlName));
 
-        org.apache.pulsar.broker.service.Producer prod = 
spy(topic.producers.values().get(0));
+        org.apache.pulsar.broker.service.Producer prod = 
(org.apache.pulsar.broker.service.Producer) 
spy(topic.producers.values().toArray()[0]);
         topic.producers.clear();
-        topic.producers.add(prod);
+        topic.producers.put(prod.getProducerName(), prod);
         CompletableFuture<Void> waitFuture = new CompletableFuture<Void>();
         doReturn(waitFuture).when(prod).disconnect();
         Set<NamespaceBundle> bundles = 
pulsar.getNamespaceService().getOwnedServiceUnits();

Reply via email to