[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: GODRIVER-2569 Use the paralleltest linter. (#1087)
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/b088660b8c763a02e1b4cb4e729700ccb4583fc7

Comment by Matt Dale [ 05/Oct/22 ]

PR: https://github.com/mongodb/mongo-go-driver/pull/1087

Generated at Thu Feb 08 08:38:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.