go test 默认在每个pkg是串行的除非test文件使用了t.Paranell(),但是在各个pkg之间是并行的。当运行 go test -v ./…等会出现并行。
使用 -p 1阻止并行
go help test
go help build
The build flags are shared by the build, clean, get, install, list, run,
and test commands:
-a
force rebuilding of packages that are already up-to-date.
-n
print the commands but do not run them.
-p n
the number of programs, such as build commands or
test binaries, that can be run in parallel.
The default is the number of CPUs available.
....