mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
pkg: move testutil to pkg
This commit is contained in:
14
pkg/test_util.go
Normal file
14
pkg/test_util.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package pkg
|
||||
|
||||
import (
|
||||
"runtime"
|
||||
)
|
||||
|
||||
// WARNING: This is a hack.
|
||||
// Remove this when we are able to block/check the status of the go-routines.
|
||||
func ForceGosched() {
|
||||
// possibility enough to sched upto 10 go routines.
|
||||
for i := 0; i < 10000; i++ {
|
||||
runtime.Gosched()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user