You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix the TestConcurrent test to pass Go's race detection.
Running the race detection against the previous version of this test reveals
race conditions surrounding the "max" variable. Subsequent work in this patch
also revealed race conditions surrounding canStop.
Additionally, it is not valid to call *Testing.FailNow in goroutines started
by the tests.
This should retain the meaning of the original test while cleaning up the race
conditions and guaranteeing the *Testing.Fatal call occurs in the correct
goroutine.
0 commit comments