提交 7c4596a6 作者: Juan Batiz-Benet

more lenient time

need to switch away from timing tests. its very annoying.
Should use proper go sync, as in
https://www.youtube.com/watch?v=ndmB0bj7eyw
上级 4c178f87
......@@ -133,7 +133,7 @@ func TestCloseLeak(t *testing.T) {
wg.Wait()
// done!
<-time.After(time.Microsecond * 100)
<-time.After(time.Millisecond * 150)
if runtime.NumGoroutine() > 20 {
// panic("uncomment me to debug")
t.Fatal("leaking goroutines:", runtime.NumGoroutine())
......
......@@ -157,7 +157,7 @@ func TestSecureCloseLeak(t *testing.T) {
wg.Wait()
// done!
<-time.After(time.Microsecond * 100)
<-time.After(time.Millisecond * 150)
if runtime.NumGoroutine() > 20 {
// panic("uncomment me to debug")
t.Fatal("leaking goroutines:", runtime.NumGoroutine())
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论