diff options
author | Clément Chigot <chigot.c@gmail.com> | 2019-10-29 15:35:42 +0100 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2019-10-29 17:38:23 +0000 |
commit | 64533374941d238c542167d67711a66ebac4ef67 (patch) | |
tree | b2032d15aa6e02fa6c9fa520122266f5fe2a7417 /src/runtime/proc_test.go | |
parent | 1a058cd04b7b902e59ff5584c7fda8ddfe388981 (diff) | |
download | go-64533374941d238c542167d67711a66ebac4ef67.tar.gz go-64533374941d238c542167d67711a66ebac4ef67.zip |
runtime: initialize netpoll in TestNetpollBreak
Netpoll must be always be initialized when TestNetpollBreak is launched.
However, when it is run in standalone, it won't be the case, so it must
be forced.
Updates: #27707
Change-Id: I28147f3834f3d6aca982c6a298feadc09b55f66e
Reviewed-on: https://go-review.googlesource.com/c/go/+/204058
Run-TryBot: Clément Chigot <clement.chigot%atos.net@gtempaccount.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/proc_test.go')
-rw-r--r-- | src/runtime/proc_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/proc_test.go b/src/runtime/proc_test.go index 3a1bf91fa5..9b80ce31e5 100644 --- a/src/runtime/proc_test.go +++ b/src/runtime/proc_test.go @@ -992,7 +992,7 @@ func TestNetpollBreak(t *testing.T) { } // Make sure that netpoll is initialized. - time.Sleep(1) + runtime.NetpollGenericInit() start := time.Now() c := make(chan bool, 2) |