Skip to content

Commit

Permalink
more lenient time
Browse files Browse the repository at this point in the history
need to switch away from timing tests. its very annoying.
Should use proper go sync, as in
https://www.youtube.com/watch?v=ndmB0bj7eyw
  • Loading branch information
jbenet committed Oct 19, 2014
1 parent 4c178f8 commit 7c4596a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion net/conn/conn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
2 changes: 1 addition & 1 deletion net/conn/secure_conn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 7c4596a

Please sign in to comment.