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

Fix flaky tests #2439

Merged
merged 4 commits into from
May 9, 2023
Merged

Fix flaky tests #2439

merged 4 commits into from
May 9, 2023

Conversation

mapno
Copy link
Member

@mapno mapno commented May 8, 2023

What this PR does:

  • TestInstanceSearchDoesNotRace is a test that frequently fails with error opening file /<path>: error opening file: open /<path>: no such file or directory

    The assumption is that the test would end before all the concurrent functions had been executed and returned. Now it forces the test to wait for concurrent() to wait to exit or the call to complete

  • Test_counter_concurrencyCorrectness would fail converting from uint64 to float64

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@mapno mapno changed the title Use WaitGroup instead of time.Sleep() Use WaitGroup instead of time.Sleep() in unstable test May 8, 2023
@mapno mapno changed the title Use WaitGroup instead of time.Sleep() in unstable test Fix flaky tests May 8, 2023
@mapno mapno self-assigned this May 9, 2023
@mapno mapno marked this pull request as ready for review May 9, 2023 11:09
@mapno mapno merged commit 7874d88 into grafana:main May 9, 2023
14 checks passed
@mapno mapno deleted the fix-instance-not-race-test branch May 9, 2023 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants