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:
parent
f71b32894a
commit
b3681c4cd3
3 changed files with 3 additions and 1 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue