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

flaky TestResetBandwidthCounter test #195

Closed
marten-seemann opened this issue Apr 21, 2021 · 1 comment · Fixed by #276
Closed

flaky TestResetBandwidthCounter test #195

marten-seemann opened this issue Apr 21, 2021 · 1 comment · Fixed by #276
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@marten-seemann
Copy link
Contributor

This is what prevents us from moving to the Unified CI setup (#189). This test is quite annoying, as it relies on time.Sleep invocations, and therefore takes 2s.

go test -run TestResetBandwidthCounter -count 100 -v ./metrics

Unfortunately, our flow metrics depend on time.Now(), there's no way to inject a clock interface, which we could mock in tests.

@Stebalien
Copy link
Member

I'm happy to disable these tests for now. But yeah, the ability to mock time here would be even better.

@marten-seemann marten-seemann added the kind/bug A bug in existing code (including security flaws) label Feb 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants