mirror of
https://github.com/distribution/distribution.git
synced 2025-09-15 06:39:25 +00:00
feat: add tparallel linter to improve handling parallel tests
This linter both prevents parallel test races as well as suggests parallel tests where appropriate: See: https://github.com/moricho/tparallel Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
This commit is contained in:
@@ -34,7 +34,7 @@ func TestWithTrace(t *testing.T) {
|
||||
}
|
||||
|
||||
ctx, done := WithTrace(Background())
|
||||
defer done("this will be emitted at end of test")
|
||||
t.Cleanup(func() { done("this will be emitted at end of test") })
|
||||
|
||||
tests := append(base, valueTestCase{
|
||||
key: "trace.func",
|
||||
|
Reference in New Issue
Block a user