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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]