mirror of
https://github.com/tendermint/tendermint.git
synced 2026-04-20 15:50:31 +00:00
consensus: add leaktest check to replay tests (#8185)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user