...
1 package gleak
2
3 import "os"
4
5
6
7
8
9
10 func IgnoreGinkgoParallelClient() {
11 ignoreCreator := "net/rpc.NewClientWithCodec"
12 if os.Getenv("GINKGO_PARALLEL_PROTOCOL") == "HTTP" {
13 ignoreCreator = "net/http.(*Transport).dialConn"
14 }
15 ignores := []Goroutine{}
16 for _, g := range Goroutines() {
17 if g.CreatorFunction == ignoreCreator {
18 ignores = append(ignores, g)
19 }
20 }
21 if len(ignores) == 0 {
22 return
23 }
24 standardFilters = append(standardFilters, IgnoringGoroutines(ignores))
25 }
26
View as plain text