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 #36

Merged
merged 1 commit into from
Nov 11, 2019
Merged

Fix flaky tests #36

merged 1 commit into from
Nov 11, 2019

Conversation

prashantv
Copy link
Collaborator

@prashantv prashantv commented Aug 23, 2019

Some tests assume that stack.All() will give a stable set of goroutines:
that any background goroutines from the test framework/previous tests
have run till they're blocked.

Add verification that stack.All() returns a "stable" set of stacks
before running these tests.

@codecov
Copy link

codecov bot commented Aug 23, 2019

Codecov Report

Merging #36 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #36   +/-   ##
=======================================
  Coverage   95.03%   95.03%           
=======================================
  Files           4        4           
  Lines         141      141           
=======================================
  Hits          134      134           
  Misses          4        4           
  Partials        3        3

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 227bd74...5254a20. Read the comment docs.

@prashantv prashantv changed the title Fix flaky TestOptionsFilters Fix flaky tests Aug 24, 2019
Some tests assume that stack.All() will give a stable set of goroutines:
that any background goroutines from the test framework/previous tests
have run till they're blocked.

Add verification that stack.All() returns a "stable" set of stacks
before running these tests.
@prashantv
Copy link
Collaborator Author

Dealing with non-determinism of schedulers is not fun, basically had to add retries to the stack.All() call till we get a "stable" state.

@abhinav
Copy link
Collaborator

abhinav commented Nov 11, 2019

There's a fair amount of similarity between the logic between the two tests (besides the retry limit). Any reason not to share the logic?

@prashantv
Copy link
Collaborator Author

There's a fair amount of similarity between the logic between the two tests (besides the retry limit). Any reason not to share the logic?

Agree, wanted to share the logic but it requires a bunch of moving around code (new test-only package, making the tests a separate _test package, etc). The movement around didn't seem worth it so kept it simple.

@prashantv prashantv merged commit 7380c5a into master Nov 11, 2019
@prashantv prashantv deleted the retry branch November 11, 2019 21:21
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.

2 participants