tests: remove panics from test fixtures (#7522)

This commit is contained in:
Sam Kleinman
2022-01-06 17:34:32 -05:00
committed by GitHub
parent a91d3cb894
commit 569629486b
27 changed files with 816 additions and 859 deletions

View File

@@ -10,6 +10,7 @@ import (
"testing"
"time"
"github.com/fortytw2/leaktest"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
dbm "github.com/tendermint/tm-db"
@@ -151,6 +152,7 @@ func TestNodeSetAppVersion(t *testing.T) {
func TestNodeSetPrivValTCP(t *testing.T) {
addr := "tcp://" + testFreeAddr(t)
t.Cleanup(leaktest.Check(t))
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
@@ -173,9 +175,7 @@ func TestNodeSetPrivValTCP(t *testing.T) {
go func() {
err := signerServer.Start(ctx)
if err != nil {
panic(err)
}
require.NoError(t, err)
}()
defer signerServer.Stop() //nolint:errcheck // ignore for tests