From cbce877480da2a59f9edd441c6cf51fa90368568 Mon Sep 17 00:00:00 2001 From: Sam Kleinman Date: Tue, 22 Mar 2022 20:00:08 -0400 Subject: [PATCH] consensus: add leaktest check to replay tests (#8185) --- internal/consensus/replay_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/consensus/replay_test.go b/internal/consensus/replay_test.go index 860824892..d24e55d67 100644 --- a/internal/consensus/replay_test.go +++ b/internal/consensus/replay_test.go @@ -12,6 +12,7 @@ import ( "testing" "time" + "github.com/fortytw2/leaktest" "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -594,6 +595,8 @@ func TestHandshakeReplayAll(t *testing.T) { sim := setupSimulator(ctx, t) + t.Cleanup(leaktest.Check(t)) + for _, m := range modes { testHandshakeReplay(ctx, t, sim, 0, m, false) } @@ -609,6 +612,8 @@ func TestHandshakeReplaySome(t *testing.T) { sim := setupSimulator(ctx, t) + t.Cleanup(leaktest.Check(t)) + for _, m := range modes { testHandshakeReplay(ctx, t, sim, 2, m, false) } @@ -639,6 +644,8 @@ func TestHandshakeReplayNone(t *testing.T) { sim := setupSimulator(ctx, t) + t.Cleanup(leaktest.Check(t)) + for _, m := range modes { testHandshakeReplay(ctx, t, sim, numBlocks, m, false) }