import "v.io/x/ref/test/goroutines"
Format formats Goroutines back into the normal string representation.
func NoLeaks(t ErrorReporter, wait time.Duration) func()
NoLeaks helps test that a test isn't leaving extra goroutines after it finishes.
The normal way to use it is: func TestFoo(t *testing.T) {
defer goroutines.NoLeaks(t, time.Second)() ... Normal test code here ...
}
The test will fail if there are goroutines running at the end of the test that weren't running at the beginning. Since testing for goroutines being finished can be racy, the detector can wait the specified duration for the set of goroutines to return to the initial set.
ErrorReporter is used by NoLeaks to report errors. testing.T implements this interface and is normally passed.
Frame represents a single stack frame.
Get gets a set of currently running goroutines and parses them into a structured representation.
Parse parses a stack trace into a structure representation.
Package goroutines imports 9 packages (graph). Updated 2020-09-08. Refresh now. Tools for package owners.