Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix/test: t.Fatal should be called from
g
running the test or bench…
…mark func The linter complains: the goroutine calls T.Fatal, which must be called in the same goroutine as the testSA2002(default). testing.T.Fail will calls testing.common.FailNow(), this function will marks the test failing and call runtime.GoExit(). Sure, it could let the calling goroutine exit, but this is a misuse. t.Fail should be used for marks the test failing and let the goroutine which runs this test or the benchmark func exit. So, just use t.Error+return instead.
- Loading branch information