With unpatched sources, I can get various tests in handler_test.go to intermittently fail simply by running tests on an upstream git clone, on a 16-core host. Running tests with GOMAXPROCS=1 makes the failures consistently reproducible.
Applying 02-Avoid_race_in_test.patch doesn't seem to have that much of an impact, regardless of GOMAXPROCS setting, i.e., the tests still intermittently fail. Even increasing the time.Sleep to a whole second doesn't help, so I wonder if the patch takes the wrong approach.
It's surprising that this hasn't been more of an issue for the upstream developers.
OpenPGP_signature
Description: OpenPGP digital signature