Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: Disable telemetry by default in tests #3200

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

Merged
merged 5 commits into from
Jul 26, 2022

Conversation

mafredri
Copy link
Member

@mafredri mafredri commented Jul 26, 2022

Telemetry reporting for coder server tests were slowing down the tests
by 60x using -race (100s vs 1.5s on my machine).

Arguably, we should make this change even if it didn't speed up the
tests.

Edit: I thought this was more impressive but I should've been more suspicious, with TestMain present and goleak disabled we were not calling m.Run().

Still a change we should make IMO.


I also noticed we don't have goleak enabled for CLI tests, this commit
adds it, but commented out. The reason being that we're nowhere near
being able to enable it yet.

Telemetry reporting for coder server tests were slowing down the tests
by ~60x using `-race` (100s vs 1.5s on my machine).

Arguably, we should make this change even if it didn't speed up the
tests.

I also noticed we don't have `goleak` enabled for CLI tests, this commit
adds it, but commented out. The reason being that we're nowhere near
being able to enable it yet.
@mafredri mafredri self-assigned this Jul 26, 2022
@mafredri mafredri requested a review from a team July 26, 2022 11:21
@mafredri
Copy link
Member Author

Whoops, forgot to call m.Run() 😅... Let's see what happens after I fix that.

@mafredri mafredri changed the title fix: Disable telemetry by default in tests for a 60x speedup fix: Disable telemetry by default in tests Jul 26, 2022
Co-authored-by: Cian Johnston <[email protected]>
@mafredri mafredri merged commit d1d8921 into main Jul 26, 2022
@mafredri mafredri deleted the mafredri/fix-cli-test-disable-telemetry-by-default branch July 26, 2022 13:27
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

Successfully merging this pull request may close these issues.

3 participants