Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jwasinger committed Jan 27, 2025
1 parent ecb7036 commit 1e30cbb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ethclient/simulated/backend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,9 @@ func createAndCloseSimBackend() {
// spawned by global variables are not considered leaked.
func TestCheckSimBackendGoroutineLeak(t *testing.T) {
createAndCloseSimBackend()
goleak.IgnoreCurrent()
ignoreCur := goleak.IgnoreCurrent()
// ignore this leveldb function: this go-routine is guaranteed to be terminated 1 second after closing db handle
ignoreLdb := goleak.IgnoreAnyFunction("github.com/syndtr/goleveldb/leveldb.(*DB).mpoolDrain")
createAndCloseSimBackend()
goleak.VerifyNone(t)
goleak.VerifyNone(t, ignoreCur, ignoreLdb)
}

0 comments on commit 1e30cbb

Please sign in to comment.