From 7c4596a6617d76ebc0468b9a79af46d417e6914c Mon Sep 17 00:00:00 2001 From: Juan Batiz-Benet <juan@benet.ai> Date: Sun, 19 Oct 2014 07:32:04 -0700 Subject: [PATCH] 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 --- net/conn/conn_test.go | 2 +- net/conn/secure_conn_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/conn/conn_test.go b/net/conn/conn_test.go index 889b67a2c..803b517a7 100644 --- a/net/conn/conn_test.go +++ b/net/conn/conn_test.go @@ -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()) diff --git a/net/conn/secure_conn_test.go b/net/conn/secure_conn_test.go index be3580693..f75671480 100644 --- a/net/conn/secure_conn_test.go +++ b/net/conn/secure_conn_test.go @@ -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()) -- GitLab