We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The text was updated successfully, but these errors were encountered:
我们知道,通常我们会使用 go test ./... 来执行某仓库下的所有用例,它的规则是:
go test ./...
而借助 t.Parallel() , 能让同包下的用例也并行,会让单测执行的更快,这也是上面检测错误的由来。
t.Parallel()
但实际上,go的单测通常是很小的方法,本身执行就很快,所以没必要非得上这个能力。甚至,有时候滥用这个能力,可能会导致数据竞争等诡异问题。所以在实际工程中,这个姿势并没有广泛普及(包括go源码的单测,很多都没使用这个姿势)。
所以 reviewbot 会继续关闭这个检查项,仅使用 paralleltest 检测可能的其他问题。
paralleltest
参考:
Sorry, something went wrong.
fix by #151
No branches or pull requests
The text was updated successfully, but these errors were encountered: