mateczagany opened a new pull request, #990:
URL: https://github.com/apache/flink-kubernetes-operator/pull/990

   ## What is the purpose of the change
   
   I often had `JobAutoScalerImplTest#testMetricReporting` fail on my local 
computer, this happens when there is less than 1ms between the two metrics 
point being added, and thus `ScalingMetricEvaluator#getRate` trying to divide 
with 0.
   
   I think it makes sense round up the duration to 1 ms in this case, even 
though it's not really expected to happen in a real scenario.
   
   ## Brief change log
   
   - Update `ScalingMetricEvaluator#getRate` to round up the difference between 
the first and last timestamps to 1 ms.
   
   ## Verifying this change
   
   - Verified locally that the test is no longer flaky on my machine.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changes to the `CustomResourceDescriptors`: 
no
     - Core observer or reconciler logic that is regularly executed: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? no
     - If yes, how is the feature documented? not applicable
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to