mirror of
https://github.com/golang/go.git
synced 2026-02-07 02:09:55 +00:00
runtime: don't overwrite global stop channel in tests
This is used by TestStopTheWorldDeadlock, and the new TestReadMetricsSched test accidentally modifies this global variable instead of (as intended) defining a local one. Change-Id: I7aaece83f285d051ad8b56b7591c76613c39613a Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest Reviewed-on: https://go-review.googlesource.com/c/go/+/696556 Reviewed-by: Michael Pratt <mpratt@google.com> TryBot-Bypass: Michael Knyszek <mknyszek@google.com>
This commit is contained in:
parent
4a7fde922f
commit
786be1d2bf
1 changed files with 1 additions and 1 deletions
|
|
@ -1774,7 +1774,7 @@ func TestReadMetricsSched(t *testing.T) {
|
|||
t.Run("waiting", func(t *testing.T) {
|
||||
// Force waiting count to be high.
|
||||
const waitingCount = 1000
|
||||
stop = make(chan bool)
|
||||
stop := make(chan bool)
|
||||
for i := 0; i < waitingCount; i++ {
|
||||
go func() { <-stop }()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue