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: run flaky upstream tests sequentially #15

Merged
merged 2 commits into from
Sep 12, 2024

Conversation

ARR4N
Copy link
Collaborator

@ARR4N ARR4N commented Sep 12, 2024

Why this should be merged

Some upstream tests are flaky and had been disabled. Others required multiple CI runs until green. This (should) address the problem while allowing all tests to be run.

Fixes #10

How this works

The flakes are race conditions, exacerbated by tests being run concurrently (higher load). The flaky tests are excluded from the primary run and are instead run sequentially; this is done first so they can fail quickly and allow a CI re-run without waiting ~5 minutes for the regular tests to pass.

How this was tested

CI trial and error.

There are fewer of them so they'll fail quickly and allow the CI run to just be restarted.
@ARR4N ARR4N marked this pull request as ready for review September 12, 2024 10:40
@ARR4N ARR4N requested review from a team, darioush, ceyonur and michaelkaplan13 and removed request for a team September 12, 2024 10:40
run: go test -short $(go list ./... | grep -Pv 'go-ethereum/(accounts/keystore|eth/downloader|miner)$')
run: | # Upstream flakes are race conditions exacerbated by concurrent tests
FLAKY_REGEX='go-ethereum/(eth|accounts/keystore|eth/downloader|miner)$';
go list ./... | grep -P "${FLAKY_REGEX}" | xargs -n 1 go test -short;
Copy link
Collaborator

Choose a reason for hiding this comment

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

just a heads up that -P isn't supported on mac

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks. I forgot because I very quickly installed GNU tools when I got one!

When we extend CI testing beyond this basic one we should discuss the extent to which we want to run upstream tests in different environments, given that they already do it extensively.

@ARR4N ARR4N merged commit 2d3894f into libevm Sep 12, 2024
1 check passed
@ARR4N ARR4N deleted the arr4n/flaky-tests-sequentially branch September 12, 2024 18:53
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.

Upstream tests are flaky
2 participants