-
Notifications
You must be signed in to change notification settings - Fork 471
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/transactions/logic
package
#4931
Tests: Fix t.Parallel()
errors in data/transactions/logic
package
#4931
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4931 +/- ##
==========================================
- Coverage 53.51% 53.51% -0.01%
==========================================
Files 432 432
Lines 53615 53615
==========================================
- Hits 28691 28690 -1
- Misses 22695 22698 +3
+ Partials 2229 2227 -2
📣 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 the effort here - By making local changes, I confirmed data/transactions/logic
no longer produces paralleletest linter errors. In addition to my visual inspection, I successfully re-ran the CI build 3 times to build confidence that the PR does not introduce non-determinism.
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.
Looking good - I'm also generally interested if there were any performance improvements with this change.
Happy to expand on the rationale live.
|
a4d0888
Summary
This PR parallelizes existing tests within the logic 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 first PR of several that will reduce test times by parallelizing existing tests within the repository. These changes will be distributed across several smaller PRs so that benefits can be seen immediately, fewer changes need reviewing, and it is less likely that new tests are introduced while waiting for these PRs to be merged.
Test Plan
All existing logic package tests passed locally and the golangci-lint paralleltest linter showed no paralleltest errors within the logic package since the initial commit.
Confirming This Locally
First, remove the revision configuration:
And remove the
data
package exclusion within the.golangci.yml
:I then ran the paralleltest linter with the following command. If nothing is output, then no errors were found.