Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

fix flaky EWMA test #205

Merged
merged 1 commit into from
Aug 12, 2022
Merged

fix flaky EWMA test #205

merged 1 commit into from
Aug 12, 2022

Conversation

marten-seemann
Copy link
Contributor

Fixes #203.

mu := exp
sig := 10.0
next := func() time.Duration {
mu := (rand.NormFloat64() * sig) + mu
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the problem. This would generate values outside of the range [90, 110] due to float overflows.


for i := 0; i < 10; i++ {
time.Sleep(200 * time.Millisecond)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally useless sleep making this test run for 2s.

@marten-seemann marten-seemann merged commit 320a84f into master Aug 12, 2022
@marten-seemann marten-seemann deleted the fix-flaky-ewma-test branch August 12, 2022 19:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

flaky TestLatencyEWMA
2 participants