-
Notifications
You must be signed in to change notification settings - Fork 476
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
Tests: Fix t.Parallel()
errors in data
package
#4981
Tests: Fix t.Parallel()
errors in data
package
#4981
Conversation
5944381
to
1243316
Compare
Codecov Report
@@ Coverage Diff @@
## master #4981 +/- ##
==========================================
- Coverage 53.65% 53.65% -0.01%
==========================================
Files 432 432
Lines 54058 54058
==========================================
- Hits 29007 29006 -1
- Misses 22805 22809 +4
+ Partials 2246 2243 -3
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jdtzmn Thanks for your effort here! I successfully re-ran the build to improve my confidence that the changes do not introduce flakiness.
Based on my local runs, the PR reduces go test -count 1 ./data
by ~20% (38s vs 31s).
I think more work is needed to vet CI improvements. As an aside, https://app.circleci.com/insights/github/algorand/go-algorand/workflows/circleci_build_and_test/overview?branch=master shows a significant increase in build time since 2023-01-06 (35min vs 20min).
Merging - There's a large number of diffs making the PR susceptible to merge conflicts. We can address any further feedback in a follow on PR. |
For future reviewer reference: A more robust local test is The test I supplied in my earlier comment only tests |
Use count > 1 as well since a parallel test should be runnable in parallel with self. |
My understanding is that Nevertheless, my standard test is |
…stability. the changes here should net improve test reliability and rationale for why several are not marked parallel.
…stability. the changes here should net improve test reliability and rationale for why several are not marked parallel.
…stability. the changes here should net improve test reliability and rationale for why several are not marked parallel. (#4996)
…4981)" (algorand#4995) This reverts commit c41cd69.
…ue to instability. the changes here should net improve test reliability and rationale for why several are not marked parallel. (algorand#4996)
Summary
This PR parallelizes existing tests within the data package. Tests that could be parallelized and were missing the t.Parallel() demarcation have been fixed and tests that are unable to be parallelized were labelled accordingly.
This is the second PR of several that will reduce test times by parallelizing existing tests within the repository. My initial, basic benchmarking shows an average decrease in data package test times of at least 20%.
Test Plan
All existing data package tests passed locally and the golangci-lint paralleltest linter showed no paralleltest errors within the data package since the initial commit.
Confirming This Locally
First, remove the revision configuration:
And remove the
data
package exclusion within the.golangci.yml
:Then run the paralleltest linter with the following command. If nothing is output, then no errors were found.