TimeWindowMax
throws ArithmeticException
with a rotateFrequency of 0
#3068
Labels
Milestone
TimeWindowMax
throws ArithmeticException
with a rotateFrequency of 0
#3068
Describe the bug
We are experiencing a bug caused by a modulus operation introduced in the
TimeWindowMax.java
class.java.lang.ArithmeticException: / by zero
is thrown when running our application tests.Environment
When running integration tests locally and as a part of gitlab build
To Reproduce
How to reproduce the bug:
I am not sure how to minimalistic reproduction of the bug. Our application was working fine on Micrometer version
1.6.4
. It fails when upgrading to version1.8.1
, see details below:The bug is caused by line 139 in the TimeWindowMax.java class.
This line will throw
java.lang.ArithmeticException: / by zero
whenever durationBetweenRoatesMillis is 0. I assume this is a bug that should be fixed.Expected behavior
I expect the calculation to work even though durationBetweenRotatesMillis is set to 0.
The text was updated successfully, but these errors were encountered: