aboutsummaryrefslogtreecommitdiffstats
path: root/container-core/src/test/java/com/yahoo
diff options
context:
space:
mode:
authorOla Aunronning <olaa@yahooinc.com>2024-04-11 15:15:33 +0200
committerOla Aunronning <olaa@yahooinc.com>2024-04-11 15:15:33 +0200
commit8cf2d2aa1ef7cc781e7448ea11014f7383920e4a (patch)
tree29379e9728ac180a17fd42dcf0efca70bb98a79a /container-core/src/test/java/com/yahoo
parent1d8cd8366c4d918459f2df1c873eb2206f1c1e11 (diff)
Fix testPrometheusFormat
Diffstat (limited to 'container-core/src/test/java/com/yahoo')
-rw-r--r--container-core/src/test/java/com/yahoo/container/jdisc/state/StateHandlerTest.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/container-core/src/test/java/com/yahoo/container/jdisc/state/StateHandlerTest.java b/container-core/src/test/java/com/yahoo/container/jdisc/state/StateHandlerTest.java
index c99a61781cb..68a7d06e7fe 100644
--- a/container-core/src/test/java/com/yahoo/container/jdisc/state/StateHandlerTest.java
+++ b/container-core/src/test/java/com/yahoo/container/jdisc/state/StateHandlerTest.java
@@ -79,10 +79,8 @@ public class StateHandlerTest extends StateHandlerTestBase {
@Test
public void testPrometheusFormat() {
- var counterContext = StateMetricContext.newInstance(Map.of("label1", "val1", "label2", "val2"));
- var otherContext = StateMetricContext.newInstance(Map.of(
- "label1", "This label has \"quotes\"",
- "label2", "This label, a\nnewline"));
+ var counterContext = StateMetricContext.newInstance(Map.of("label", "This label has \"quotes\""));
+ var otherContext = StateMetricContext.newInstance(Map.of("label", "This label, a\nnewline"));
var snapshot = new MetricSnapshot(0L, SNAPSHOT_INTERVAL, TimeUnit.MILLISECONDS);
snapshot.add(counterContext, "some.counter", 10);
snapshot.add(counterContext, "some.counter", 20);
@@ -100,8 +98,8 @@ public class StateHandlerTest extends StateHandlerTestBase {
bar_count 2 300000
bar_max 40.0 300000
bar_sum 60.0 300000
- some_counter_count{label1="This label has \\"quotes\\"",label2="This label, a\\nnewline",} 3 300000
- some_counter_count{label1="val1",label2="val2",} 30 300000
+ some_counter_count{label="This label has \\"quotes\\"",} 30 300000
+ some_counter_count{label="This label, a\\nnewline",} 3 300000
testing_infinity_count 1 300000
testing_infinity_max -Inf 300000
testing_infinity_sum -Inf 300000