pkg: move testutil to pkg

This commit is contained in:
Xiang Li
2014-09-25 10:40:40 -07:00
parent 2e4f725c2b
commit 45f71af33e
3 changed files with 13 additions and 13 deletions

14
pkg/test_util.go Normal file
View 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()
}
}