MCPcopy
hub / github.com/uber-go/goleak / TestOptionsIgnoreAnyFunction

Function TestOptionsIgnoreAnyFunction

options_test.go:74–89  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

72}
73
74func TestOptionsIgnoreAnyFunction(t *testing.T) {
75 cur := stack.Current()
76 opts := buildOpts(IgnoreAnyFunction("go.uber.org/goleak.(*blockedG).run"))
77
78 for _, s := range stack.All() {
79 if s.ID() == cur.ID() {
80 continue
81 }
82
83 if opts.filter(s) {
84 continue
85 }
86
87 t.Errorf("Unexpected goroutine: %v", s)
88 }
89}
90
91func TestOptionsRetry(t *testing.T) {
92 opts := buildOpts()

Callers

nothing calls this directly

Calls 6

CurrentFunction · 0.92
AllFunction · 0.92
buildOptsFunction · 0.85
IgnoreAnyFunctionFunction · 0.85
IDMethod · 0.80
filterMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…