Skip to content

Commit 64a7799

Browse files
committed
Test coverage fixed
1 parent e1826bf commit 64a7799

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

exporters/prometheus/src/test/java/io/opentelemetry/exporter/prometheus/Otel2PrometheusConverterTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ void labelValueSerialization_NonPrimitives() {
169169
Attributes.builder()
170170
.put(
171171
AttributeKey.stringArrayKey("stringKey"),
172-
Arrays.asList("stringValue1", "\\\\\\+\b+\f+\n+\r+\t+" + (char) 0))
172+
Arrays.asList("stringValue1", "\"+\\\\\\+\b+\f+\n+\r+\t+" + (char) 0))
173173
.put(AttributeKey.booleanArrayKey("booleanKey"), Arrays.asList(true, false))
174174
.put(AttributeKey.longArrayKey("longKey"), Arrays.asList(12345L, 6789L))
175175
.put(AttributeKey.doubleArrayKey("doubleKey"), Arrays.asList(0.12345, 0.6789))
@@ -180,7 +180,7 @@ void labelValueSerialization_NonPrimitives() {
180180
MetricSnapshots snapshots = converter.convert(Collections.singletonList(metricData));
181181

182182
assertThat(snapshots.get(0).getDataPoints().get(0).getLabels().get("stringKey"))
183-
.isEqualTo("[\"stringValue1\", \"\\\\\\\\\\\\+\\b+\\f+\\n+\\r+\\t+\\u0000\"]");
183+
.isEqualTo("[\"stringValue1\", \"\\\"+\\\\\\\\\\\\+\\b+\\f+\\n+\\r+\\t+\\u0000\"]");
184184
assertThat(snapshots.get(0).getDataPoints().get(0).getLabels().get("booleanKey"))
185185
.isEqualTo("[true, false]");
186186
assertThat(snapshots.get(0).getDataPoints().get(0).getLabels().get("longKey"))

0 commit comments

Comments
 (0)