Skip to content

Commit

Permalink
chore: fix goleak check (#1619)
Browse files Browse the repository at this point in the history
Signed-off-by: mornyx <[email protected]>
  • Loading branch information
mornyx committed Nov 27, 2023
1 parent ca508a8 commit 5f488f0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion util/testutil/testdefault/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ func enableDebugLog() {
func TestMain(m *testing.M) {
enableDebugLog()
gin.SetMode(gin.TestMode)
goleak.VerifyTestMain(m)
opts := []goleak.Option{
goleak.IgnoreTopFunction("github.com/ReneKroon/ttlcache/v2.(*Cache).startExpirationProcessing"),
}
goleak.VerifyTestMain(m, opts...)
runtime.GC()
}

0 comments on commit 5f488f0

Please sign in to comment.