You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by lh...@apache.org on 2026/09/14 14:18:05 UTC
(pulsar) 03/17: [fix][test][branch-4.0] Use initialized namespace in dynamic metrics configuration test
This is an automated email from the ASF dual-hosted git repository.
lhotari pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit 4dc77f7bbf7d6de523a19f19256610c3a94639e6
Author: Lari Hotari <lh...@apache.org>
AuthorDate: Mon Sep 14 13:04:56 2026 +0300
[fix][test][branch-4.0] Use initialized namespace in dynamic metrics configuration test
Fix the test introduced by 6224c44fb80 ([improve][broker] Make exposing
topic level metric dynamic, #21006), cherry-picked from
91f690ff7b30a5d4160a3eb80ab0cc709c70195f via branch-4.2 commit 3eb8ae0a3f5.
Upstream and branch-4.2 create "my-property/my-ns" in
BrokerTestBase.baseSetupCommon() following the V1 topic-name removal
(#25304; branch-4.2 commit 735b429ca33). Branch-4.0 retains the older
setup, which creates "prop/ns-abc" but not "my-property/my-ns".
The backported test used the newer setup's namespace and failed with
Namespace not found. Use "prop/ns-abc" for its topic.
Validation: testDynamicMetricsConfiguration passes.
---
.../test/java/org/apache/pulsar/broker/stats/PrometheusMetricsTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/stats/PrometheusMetricsTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/stats/PrometheusMetricsTest.java
index 8cd1611e5c34..2fe77d9b9be5 100644
--- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/stats/PrometheusMetricsTest.java
+++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/stats/PrometheusMetricsTest.java
@@ -137,7 +137,7 @@ public class PrometheusMetricsTest extends BrokerTestBase {
@Test
public void testDynamicMetricsConfiguration() throws Exception {
- String topic = "persistent://my-property/my-ns/dynamic-metrics";
+ String topic = "persistent://prop/ns-abc/dynamic-metrics";
try (Producer<byte[]> producer = pulsarClient.newProducer().topic(topic)
.producerName("dynamic-producer").create();
Consumer<byte[]> consumer = pulsarClient.newConsumer().topic(topic)