diff --git a/internal/consensus/byzantine_test.go b/internal/consensus/byzantine_test.go index 7a04e4613..7978d5e29 100644 --- a/internal/consensus/byzantine_test.go +++ b/internal/consensus/byzantine_test.go @@ -41,7 +41,7 @@ func TestByzantinePrevoteEquivocation(t *testing.T) { config := configSetup(t) - nValidators := 4 + nValidators := 2 prevoteHeight := int64(2) testName := "consensus_byzantine_test" tickerFunc := newMockTickerFunc(true) @@ -280,7 +280,7 @@ func TestByzantinePrevoteEquivocation(t *testing.T) { select { case <-sig: case <-subctx.Done(): - t.Fatal("encountered timeout") + t.Fatalf("encountered error: %v", subctx.Err()) } pubkey, err := bzNodeState.privValidator.GetPubKey(ctx) diff --git a/internal/consensus/state_test.go b/internal/consensus/state_test.go index c0da3db8d..eff09228f 100644 --- a/internal/consensus/state_test.go +++ b/internal/consensus/state_test.go @@ -2251,8 +2251,7 @@ func TestCommitFromPreviousRound(t *testing.T) { assert.True(t, rs.ProposalBlockParts.Header().Equals(blockID.PartSetHeader)) partSet, err = propBlock.MakePartSet(partSize) require.NoError(t, err) - err = cs1.SetProposalAndBlock(ctx, prop, propBlock, partSet, "some peer") - require.NoError(t, err) + require.NoError(t, cs1.SetProposalAndBlock(ctx, prop, propBlock, partSet, "some peer")) ensureNewProposal(t, proposalCh, height, round) ensureNewRound(t, newRoundCh, height+1, 0) @@ -2718,7 +2717,7 @@ func subscribe( Limit: 65536, }) require.NoErrorf(t, err, "Failed to subscribe %q to %v: %v", testSubscriber, q, err) - ch := make(chan tmpubsub.Message) + ch := make(chan tmpubsub.Message, 8) go func() { for { next, err := sub.Next(ctx)