Commit 7c4596a6 authored by Juan Batiz-Benet's avatar 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
parent 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 is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment