Skip to content

Commit

Permalink
de-flake test
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenlanders committed Jan 2, 2024
1 parent db60250 commit 02d1478
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/consensus/reactor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ func TestReactorRecordsVotesAndBlockParts(t *testing.T) {
}

func TestReactorVotingPowerChange(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Minute)
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()

cfg := configSetup(t)
Expand All @@ -795,7 +795,7 @@ func TestReactorVotingPowerChange(t *testing.T) {

t.Cleanup(cleanup)

rts := setup(ctx, t, n, states, 1048576) // buffer must be large enough to not deadlock
rts := setup(ctx, t, n, states, 2*1048576) // buffer must be large enough to not deadlock

for _, reactor := range rts.reactors {
state := reactor.state.GetState()
Expand Down Expand Up @@ -854,7 +854,7 @@ func TestReactorVotingPowerChange(t *testing.T) {
func() bool {
return previousTotalVotingPower != states[0].GetRoundState().LastValidators.TotalVotingPower()
},
15*time.Second,
1*time.Minute,
300*time.Millisecond,
"expected voting power to change (before: %d, after: %d)",
previousTotalVotingPower,
Expand All @@ -875,7 +875,7 @@ func TestReactorVotingPowerChange(t *testing.T) {
func() bool {
return previousTotalVotingPower != states[0].GetRoundState().LastValidators.TotalVotingPower()
},
15*time.Second,
1*time.Minute,
300*time.Millisecond,
"expected voting power to change (before: %d, after: %d)",
previousTotalVotingPower,
Expand All @@ -895,7 +895,7 @@ func TestReactorVotingPowerChange(t *testing.T) {
func() bool {
return previousTotalVotingPower != states[0].GetRoundState().LastValidators.TotalVotingPower()
},
15*time.Second,
1*time.Minute,
300*time.Millisecond,
"expected voting power to change (before: %d, after: %d)",
previousTotalVotingPower,
Expand Down

0 comments on commit 02d1478

Please sign in to comment.