Skip to content

Commit

Permalink
test(consensus): fix flaky TestEmitNewValidBlockEventOnCommitWithoutB…
Browse files Browse the repository at this point in the history
…lock (#772)
  • Loading branch information
lklimek authored Apr 4, 2024
1 parent 333406b commit 53ec39b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/consensus/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2658,7 +2658,9 @@ func TestEmitNewValidBlockEventOnCommitWithoutBlock(t *testing.T) {
ensureNewValidBlock(t, validBlockCh, height, round)

rs := cs1.GetRoundState()
assert.EqualValues(t, cstypes.RoundStepPrecommit.String(), rs.Step.String())
// due to some delays, we might be on Precommit or ApplyCommit step,
// as these steps just follow one another with no delay
assert.Contains(t, []cstypes.RoundStepType{cstypes.RoundStepPrecommit, cstypes.RoundStepApplyCommit}, rs.Step)
assert.Nil(t, rs.ProposalBlock)
assert.True(t, rs.ProposalBlockParts.Header().Equals(blockID.PartSetHeader))
}
Expand Down

0 comments on commit 53ec39b

Please sign in to comment.