Browse Source

conensus: put timeouts on reactor tests (#7733)

pull/7738/head
Sam Kleinman 3 years ago
committed by GitHub
parent
commit
2f1e08e948
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions
  1. +6
    -6
      internal/consensus/reactor_test.go

+ 6
- 6
internal/consensus/reactor_test.go View File

@ -318,7 +318,7 @@ func ensureBlockSyncStatus(t *testing.T, msg tmpubsub.Message, complete bool, he
} }
func TestReactorBasic(t *testing.T) { func TestReactorBasic(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel() defer cancel()
cfg := configSetup(t) cfg := configSetup(t)
@ -371,7 +371,7 @@ func TestReactorBasic(t *testing.T) {
} }
func TestReactorWithEvidence(t *testing.T) { func TestReactorWithEvidence(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel() defer cancel()
cfg := configSetup(t) cfg := configSetup(t)
@ -479,7 +479,7 @@ func TestReactorWithEvidence(t *testing.T) {
} }
func TestReactorCreatesBlockWhenEmptyBlocksFalse(t *testing.T) { func TestReactorCreatesBlockWhenEmptyBlocksFalse(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel() defer cancel()
cfg := configSetup(t) cfg := configSetup(t)
@ -535,7 +535,7 @@ func TestReactorCreatesBlockWhenEmptyBlocksFalse(t *testing.T) {
} }
func TestReactorRecordsVotesAndBlockParts(t *testing.T) { func TestReactorRecordsVotesAndBlockParts(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel() defer cancel()
cfg := configSetup(t) cfg := configSetup(t)
@ -600,7 +600,7 @@ func TestReactorRecordsVotesAndBlockParts(t *testing.T) {
} }
func TestReactorVotingPowerChange(t *testing.T) { func TestReactorVotingPowerChange(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel() defer cancel()
cfg := configSetup(t) cfg := configSetup(t)
@ -707,7 +707,7 @@ func TestReactorVotingPowerChange(t *testing.T) {
} }
func TestReactorValidatorSetChanges(t *testing.T) { func TestReactorValidatorSetChanges(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel() defer cancel()
cfg := configSetup(t) cfg := configSetup(t)


Loading…
Cancel
Save