261023.4 · 35082dd6a557aa0802e4dfccbe9f16faa23ff2a6
Tests wait for the online-repo goroutines
The tests swap the globals cacheRoot and webScheme, and their cleanup cancelled web's context without waiting. A repo probe or listing still running read the global while the next test or the cleanup wrote it, which go test -race reported. web now counts what it starts in a WaitGroup, and the cleanup waits for it. A running server sets these globals once at start, so it never raced.
TestPageBudget skips under the race detector, which slows every page past five milliseconds.
reading declarations
Changes to race_test.go. All files
@@ -0,0 +1,7 @@+//go:build race++package main++// raceOn reports whether the race detector is built in. It slows code+// five to 10 times, so timing tests skip under it.+const raceOn = true