Browse Source

consensus: add leacktest check to replay tests

pull/8185/head
tycho garen 3 years ago
parent
commit
caaafd1a7b
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      internal/consensus/replay_test.go

+ 7
- 0
internal/consensus/replay_test.go View File

@ -12,6 +12,7 @@ import (
"testing" "testing"
"time" "time"
"github.com/fortytw2/leaktest"
"github.com/gogo/protobuf/proto" "github.com/gogo/protobuf/proto"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
@ -594,6 +595,8 @@ func TestHandshakeReplayAll(t *testing.T) {
sim := setupSimulator(ctx, t) sim := setupSimulator(ctx, t)
t.Cleanup(leaktest.Check(t))
for _, m := range modes { for _, m := range modes {
testHandshakeReplay(ctx, t, sim, 0, m, false) testHandshakeReplay(ctx, t, sim, 0, m, false)
} }
@ -609,6 +612,8 @@ func TestHandshakeReplaySome(t *testing.T) {
sim := setupSimulator(ctx, t) sim := setupSimulator(ctx, t)
t.Cleanup(leaktest.Check(t))
for _, m := range modes { for _, m := range modes {
testHandshakeReplay(ctx, t, sim, 2, m, false) testHandshakeReplay(ctx, t, sim, 2, m, false)
} }
@ -639,6 +644,8 @@ func TestHandshakeReplayNone(t *testing.T) {
sim := setupSimulator(ctx, t) sim := setupSimulator(ctx, t)
t.Cleanup(leaktest.Check(t))
for _, m := range modes { for _, m := range modes {
testHandshakeReplay(ctx, t, sim, numBlocks, m, false) testHandshakeReplay(ctx, t, sim, numBlocks, m, false)
} }


Loading…
Cancel
Save