-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/cuetdtest: move testing.T out of M
It's common to run multiple subtests inside a single point in the matrix, but it turns out that's problematic: if one of those tests ends up failing by using `m.T`, it will fail the outer test, not the one that's currently running, ending up with the testing package printing "subtest may have called FailNow on a parent test". We could make sure to update `M.T` for each subtest, but that's problematic itself, because multiple subtests will share a given `*M` instance and if any of them happens to invoke `T.Parallel` then there's a race condition. Instead, make `M` just about the point in the matrix and add an explicit `*testing.T` argument to the methods that it has that do checks. Signed-off-by: Roger Peppe <rogpeppe@gmail.com> Change-Id: Id83ba0fac6c4db7780d4086820aed4190dd5bd65 Dispatch-Trailer: {"type":"trybot","CL":1200260,"patchset":4,"ref":"refs/changes/60/1200260/4","targetBranch":"master"}
- Loading branch information
Showing
11 changed files
with
162 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.