From cec4876dfc0134ef6057085dcf82daa8b948c4ac Mon Sep 17 00:00:00 2001 From: Alessio Treglia Date: Sun, 29 Nov 2020 09:25:23 +0000 Subject: [PATCH] use t.Cleanup() for leakage test as well --- p2p/conn/connection_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/p2p/conn/connection_test.go b/p2p/conn/connection_test.go index a826af559..12f68f437 100644 --- a/p2p/conn/connection_test.go +++ b/p2p/conn/connection_test.go @@ -297,7 +297,7 @@ func TestMConnectionMultiplePings(t *testing.T) { func TestMConnectionPingPongs(t *testing.T) { // check that we are not leaking any go-routines - defer leaktest.CheckTimeout(t, 10*time.Second)() + t.Cleanup(leaktest.CheckTimeout(t, 10*time.Second)) server, client := net.Pipe() t.Cleanup(closeAll(t, client, server))