[short] skip
[!race] skip

go test -race testrace

-- go.mod --
module testrace

go 1.16
-- race_test.go --
package testrace

import "testing"

func TestRace(t *testing.T) {
	helperDone := make(chan struct{})
	go func() {
		t.Logf("Something happened before cleanup.")
		close(helperDone)
	}()

	t.Cleanup(func() {
		<-helperDone
	})
}
