The parallel parameter is currently described here as setting the go test -parallel flag, but it is instead setting the -p flag here - which is confusingly an entirely different setting that does not control the number of parallel tests within a package (t.Parallel), but the number of distinct test binaries that can be ran in parallel.
Allow parallel execution of test functions that call t.Parallel. The value of this flag is the maximum number of tests to run simultaneously
Relevant excerpt from go help testflag
-parallel n
Allow parallel execution of test functions that call t.Parallel,
...
By default, -parallel is set to the value of GOMAXPROCS.
...
Note that -parallel only applies within a single test binary.
The 'go test' command may run tests for different packages
in parallel as well, according to the setting of the -p flag
(see 'go help build').
And for go help build
-p n
the number of programs, such as build commands or
test binaries, that can be run in parallel.
The default is GOMAXPROCS, normally the number of CPUs available.
I'm not sure what the right move here is for this project, but IHMO -p 1 is an inappropriate default
The
parallel
parameter is currently described here as setting thego test -parallel
flag, but it is instead setting the-p
flag here - which is confusingly an entirely different setting that does not control the number of parallel tests within a package (t.Parallel), but the number of distinct test binaries that can be ran in parallel.Relevant excerpt from
go help testflag
And for
go help build
I'm not sure what the right move here is for this project, but IHMO
-p 1
is an inappropriate default