The race detector currently detects a race with len(chan) against close(chan). See: https://github.com/golang/go/issues/27070 Skip the tests which trip this bug under the race detector.