Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove use of time.Sleep in telemetry tests #5886

Open
adklempner opened this issue Sep 28, 2024 · 0 comments
Open

Remove use of time.Sleep in telemetry tests #5886

adklempner opened this issue Sep 28, 2024 · 0 comments

Comments

@adklempner
Copy link
Contributor

adklempner commented Sep 28, 2024

Problem

Tests need to be deterministic. Currently, tests of the telemetry client rely on use of time.Sleep to trigger the behavior.

Implementation

Replace use of time.Sleep with direct invocation of functionality being tested (e.g. #5885 )

Acceptance Criteria

No instances of time.Sleep in telemetry/client_test.go

Notes

Likely means using client.Start() in tests is a no-go. May be worth refactoring some of the logic within the go-routines that it starts into functions.

Future Steps

Avoid time.Sleep in new tests moving forward

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant