You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/07/27 07:38:59 UTC

[GitHub] [pulsar] codelipenghui commented on a diff in pull request #15867: add metric for InMemoryDelayedDeliveryTracker's memory usage

codelipenghui commented on code in PR #15867:
URL: https://github.com/apache/pulsar/pull/15867#discussion_r930722492


##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/service/persistent/PersistentTopicTest.java:
##########
@@ -308,4 +307,70 @@ public void testAutoCreatePartitionedTopicThatNameIncludePartition() throws Exce
         assertEquals(admin.topics().getList(ns).size(), 0);
         pulsar.getConfiguration().setAllowAutoTopicCreationType("non-partitioned");
     }
+
+
+    @Test
+    public void testNamespaceLevelDelayedDeliveryTrackerMemoryUsageMetric() throws Exception {
+        String topic = "persistent://prop/autoNs/test_delayed_message_metric" + UUID.randomUUID();
+        testDelayedDeliveryTrackerMemoryUsageMetric(topic, false);
+    }
+
+    @Test
+    public void testTopicLevelDelayedDeliveryTrackerMemoryUsageMetric() throws Exception {
+        String topic = "persistent://prop/autoNs/test_delayed_message_metric" + UUID.randomUUID();
+        testDelayedDeliveryTrackerMemoryUsageMetric(topic, true);
+    }

Review Comment:
   I mean we don't need two methods, instead we can just create a data provider
   
   e.g. https://github.com/apache/pulsar/blob/21c3a0b5c93fd30fd458fbab818d059fef4fd8ba/pulsar-io/elastic-search/src/test/java/org/apache/pulsar/io/elasticsearch/IndexNameFormatterTest.java#L45



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org