You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by mm...@apache.org on 2022/06/09 23:17:44 UTC

[pulsar] branch master updated: Fix ut MessageDispatchThrottlingTest#testDispatchRateCompatibility2 (#15999)

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

mmerli 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 e0a98549513 Fix ut MessageDispatchThrottlingTest#testDispatchRateCompatibility2 (#15999)
e0a98549513 is described below

commit e0a9854951364d07e2ddb7bce2f891b65400fb41
Author: Xiaoyu Hou <An...@gmail.com>
AuthorDate: Fri Jun 10 07:17:31 2022 +0800

    Fix ut MessageDispatchThrottlingTest#testDispatchRateCompatibility2 (#15999)
---
 .../org/apache/pulsar/client/api/MessageDispatchThrottlingTest.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/MessageDispatchThrottlingTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/MessageDispatchThrottlingTest.java
index abf24420d9b..561f4a4a159 100644
--- a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/MessageDispatchThrottlingTest.java
+++ b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/MessageDispatchThrottlingTest.java
@@ -25,6 +25,7 @@ import com.google.common.collect.Sets;
 
 import java.lang.reflect.Field;
 import java.util.Arrays;
+import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
@@ -1072,7 +1073,8 @@ public class MessageDispatchThrottlingTest extends ProducerConsumerBase {
         PersistentTopic topic = (PersistentTopic) pulsar.getBrokerService().getOrCreateTopic(topicName).get();
         Optional<DispatchRateLimiter> dispatchRateLimiter;
 
-        Policies policies = new Policies();
+        Policies policies = admin.namespaces().getPolicies(namespace);
+        policies.clusterSubscribeRate = new HashMap<>();
         DispatchRateImpl clusterDispatchRate = DispatchRateImpl.builder()
                 .dispatchThrottlingRateInMsg(100)
                 .dispatchThrottlingRateInByte(512)