Skip to content

Commit

Permalink
Goroutine verification should ignore SetTimeout goroutines
Browse files Browse the repository at this point in the history
  • Loading branch information
prashantv committed Mar 31, 2016
1 parent b37d0aa commit a4ed28e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions testutils/goroutines/verify.go
Expand Up @@ -21,6 +21,7 @@
package goroutines

import (
"bytes"
"fmt"
"runtime"
"testing"
Expand All @@ -35,6 +36,10 @@ const _expectedRuntimeGoroutines = 2
func filterStacks(stacks []Stack, opts *VerifyOpts) []Stack {
filtered := stacks[:0]
for _, stack := range stacks {
// Ignore any goroutines that are blocked in SetTimeout.
if bytes.Contains(stack.Full(), []byte("testutils.SetTimeout")) {
continue
}
if opts.ShouldSkip(stack) {
continue
}
Expand Down

0 comments on commit a4ed28e

Please sign in to comment.