Skip to content

Commit be92eb5

Browse files
codelipenghuijiazhai
authored andcommitted
Fix unit test (apache#6006)
### Motivation Since apache#5599 merged, it introduce some conflict code with master branch, maybe the reason is apache#5599 not rebase with master ### Verifying this change This is a test change (cherry picked from commit 275854e)
1 parent 86505a2 commit be92eb5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerServiceTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -946,9 +946,9 @@ public void testStuckTopicUnloading() throws Exception {
946946
.get(mlFactory);
947947
assertNotNull(ledgers.get(topicMlName));
948948

949-
org.apache.pulsar.broker.service.Producer prod = spy(topic.producers.values().get(0));
949+
org.apache.pulsar.broker.service.Producer prod = (org.apache.pulsar.broker.service.Producer) spy(topic.producers.values().toArray()[0]);
950950
topic.producers.clear();
951-
topic.producers.add(prod);
951+
topic.producers.put(prod.getProducerName(), prod);
952952
CompletableFuture<Void> waitFuture = new CompletableFuture<Void>();
953953
doReturn(waitFuture).when(prod).disconnect();
954954
Set<NamespaceBundle> bundles = pulsar.getNamespaceService().getOwnedServiceUnits();

0 commit comments

Comments
 (0)