Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use copy of loop variable in parallel test (#23669)
This fixes an occurrence of a loop variable being captured in a parallel test. With the previous code, only the last test case is actually exercised. To work around this problem, we create a local copy of the range variable before the parallel test, as suggested in the Go documentation for the `testing` package: https://pkg.go.dev/testing#hdr-Subtests_and_Sub_benchmarks Issue was found automatically using the `loopvarcapture` linter.
- Loading branch information