cockroach: github.com/cockroachdb/cockroach/pkg/util/leaktest Index | Files

package leaktest

import "github.com/cockroachdb/cockroach/pkg/util/leaktest"

Package leaktest provides tools to detect leaked goroutines in tests. To use it, call "defer leaktest.AfterTest(t)()" at the beginning of each test that may use goroutines.

Index

Package Files

leaktest.go

func AfterTest Uses

func AfterTest(t testing.TB) func()

AfterTest snapshots the currently-running goroutines and returns a function to be run at the end of tests to see whether any goroutines leaked.

Package leaktest imports 9 packages (graph). Updated 2019-07-12. Refresh now. Tools for package owners.