Skip to content

Commit 08bd2bb

Browse files
committed
fix CounterTest created timestamp flake
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
1 parent 9e05c1d commit 08bd2bb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics

prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/CounterTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ void testTotalStrippedFromName(String name) {
123123
assertThat(ProtobufUtil.shortDebugString(protobufData))
124124
.matches(
125125
"^name: \"my_counter_seconds_total\" type: COUNTER metric \\{ counter \\{ value: 0.0"
126-
+ " created_timestamp \\{ seconds: \\d+ nanos: \\d+ } } }$");
126+
+ " created_timestamp \\{ seconds: \\d+( nanos: \\d+)? } } }$");
127127
}
128128

129129
@Test

0 commit comments

Comments
 (0)