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: try to deflake several flaky tests #934

Merged
merged 7 commits into from
Dec 6, 2023
Merged

Conversation

kentquirk
Copy link
Contributor

@kentquirk kentquirk commented Dec 6, 2023

Which problem is this PR solving?

We've had some problematic flaky tests.

  • Some were because of probabalistic assertions relating to samplers -- we now run the worst of those a second time if they fail.
  • Some were waiting for events on another goroutine that might not have been scheduled, and these have been adjusted by using assert.Eventually which is actually pretty useful.

Fixes #896
Fixes #897
Fixes #901
Fixes #902

Plus a couple of other tests that hadn't gotten their own issue.

This might also make the tests run a little bit faster overall.

You might want to turn off whitespace when reviewing this, because the retry loop changed indentation.

@kentquirk kentquirk requested a review from a team as a code owner December 6, 2023 19:36
Copy link
Contributor

@fchikwekwe fchikwekwe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a question about the event based change, but otherwise lgtm

collect/collect_test.go Show resolved Hide resolved
sharder/deterministic_test.go Show resolved Hide resolved
@kentquirk kentquirk merged commit cec0f3f into main Dec 6, 2023
5 checks passed
@kentquirk kentquirk deleted the kent.fix_flaky_tests branch December 6, 2023 20:06
kentquirk added a commit that referenced this pull request Dec 6, 2023
## Which problem is this PR solving?

- After merging #934, integration tests started failing because they
can't safely run in parallel.

## Short description of the changes

- Make the tests run against different ports.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants