[GODRIVER-2569] Use the paralleltest linter to check for parallelized test bugs Created: 05/Oct/22 Updated: 11/Oct/22 Resolved: 11/Oct/22 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | Testing |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Unknown |
| Reporter: | Matt Dale | Assignee: | Matt Dale |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Documentation Changes: | Not Needed |
| Description |
|
Add the "paralleltest" linter to the list of linters run with golangci-lint. That linter reports when tests don't call t.Parallel() to run subtests in parallel and when t.Parallel() is used incorrectly (e.g. without capturing the test case for loop variable). We have a lot of tests that can't currently be parallelized, so configure the linter to only check for incorrect usage, not missing t.Parallel() calls. |
| Comments |
| Comment by Githook User [ 10/Oct/22 ] |
|
Author: {'name': 'Matt Dale', 'email': '9760375+matthewdale@users.noreply.github.com', 'username': 'matthewdale'}Message: |
| Comment by Matt Dale [ 05/Oct/22 ] |