Closed thanodnl closed 8 years ago
Ran the unit tests on travis 6 times without any flap on the changed test.
LGTM. it's sad though that we can't inject a different time in the meter library.
The LGTM is in alt-text.
I think we can optimise this
time.Sleep(5100*time.Millisecond)
This PR is in the hope to fix a flappy test that happens more often than not:
The reasoning behind the change is that
metrics.Meter
mentioned in the comments above is snapshotted every 5 seconds and made available to read from. By exactly waiting 5 seconds we might still read the values just before the snapshot is actually populated with information. By waiting an additional second the hope is that we read less 0's.