pull/31033/head
Jared Wasinger 2 weeks ago
parent ecb7036cc9
commit 1e30cbb1f4
  1. 6
      ethclient/simulated/backend_test.go

@ -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)
}

Loading…
Cancel
Save