-
Notifications
You must be signed in to change notification settings - Fork 332
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 running the test or benchmark…
… 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
1 parent
b894f41
commit 9b6a266
Showing
5 changed files
with
20 additions
and
12 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
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
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