vithnilica

Results 3 comments of vithnilica

it's work ```golang import ( "runtime" "testing" "time" "github.com/patrickmn/go-cache" "go.uber.org/goleak" ) func leaktest(t *testing.T) { defer goleak.VerifyNone(t) cache.New(5*time.Minute, 10*time.Minute) runtime.GC() } func main() { testSuite := []testing.InternalTest{{Name: "leaktest", F: leaktest}}...

It is not memory leaks (or goroutine leak). "go.uber.org/goleak" test does not wait for "garbage collector".

The test counts the number of goroutines at the beginning and at the end. You need to clean up the memory (garbage collection) before terminating the test. Golang typically does...