Skip to content

Commit a3b4358

Browse files
committed
add test for incorrect parsing for MeterValue
1 parent 6f5874d commit a3b4358

File tree

1 file changed

+6
-0
lines changed
  • spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics

1 file changed

+6
-0
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/MeterValueTests.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ void getValueForTimerWhenFromNumberShouldReturnMsToNanosValue() {
5858
assertThat(meterValue.getValue(Type.TIMER)).isEqualTo(123000000);
5959
}
6060

61+
@Test
62+
void getValueForTimerWhenFromNumberStringShouldReturnMsToNanosValue() {
63+
MeterValue meterValue = MeterValue.valueOf("123d");
64+
assertThat(meterValue.getValue(Type.TIMER)).isEqualTo(1.06E+16);
65+
}
66+
6167
@Test
6268
void getValueForTimerWhenFromNumberStringShouldMsToNanosValue() {
6369
MeterValue meterValue = MeterValue.valueOf("123");

0 commit comments

Comments
 (0)