Skip to content

Commit 3761f7e

Browse files
authored
util/async: make TestExecConcurrent stable (#1683)
close #1682 Signed-off-by: zyguan <[email protected]>
1 parent 557a498 commit 3761f7e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

util/async/runloop_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ func TestExecCancelWhileWaiting(t *testing.T) {
142142
}
143143

144144
func TestExecConcurrent(t *testing.T) {
145+
defaultMaxProcs := runtime.GOMAXPROCS(0)
146+
defer runtime.GOMAXPROCS(defaultMaxProcs)
147+
runtime.GOMAXPROCS(1)
145148
l := NewRunLoop()
146149
l.Append(func() {
147150
time.Sleep(time.Millisecond)

0 commit comments

Comments
 (0)