Browse Source

e2e: slow load processes with longer evidence timeouts (#6936)

These are mostly the timeouts that I think we're still hitting in CI. 

At this point, the tests (on master) pass on my local machine (which is quite beefy) so I think this is just the first in (perhaps?) a sequence of changes that attempt to change timeouts and load patterns so that the tests pass in CI more reliably.
pull/6938/head
Sam Kleinman 3 years ago
committed by GitHub
parent
commit
c257cda212
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 9 deletions
  1. +2
    -2
      test/e2e/runner/evidence.go
  2. +3
    -7
      test/e2e/runner/load.go

+ 2
- 2
test/e2e/runner/evidence.go View File

@ -79,7 +79,7 @@ func InjectEvidence(ctx context.Context, testnet *e2e.Testnet, amount int) error
return err
}
wctx, cancel := context.WithTimeout(ctx, 30*time.Second)
wctx, cancel := context.WithTimeout(ctx, time.Minute)
defer cancel()
// wait for the node to reach the height above the forged height so that
@ -110,7 +110,7 @@ func InjectEvidence(ctx context.Context, testnet *e2e.Testnet, amount int) error
}
}
wctx, cancel = context.WithTimeout(ctx, 10*time.Second)
wctx, cancel = context.WithTimeout(ctx, 30*time.Second)
defer cancel()
// wait for the node to reach the height above the forged height so that


+ 3
- 7
test/e2e/runner/load.go View File

@ -62,12 +62,8 @@ func Load(ctx context.Context, testnet *e2e.Testnet) error {
logger.Info("ending transaction load",
"dur_secs", time.Since(started).Seconds(),
"txns", success,
"rate", rate)
if rate < 2 {
logger.Error("transaction throughput was low",
"rate", rate)
}
"rate", rate,
"slow", rate < 1)
return nil
}
@ -109,7 +105,7 @@ func loadGenerate(ctx context.Context, chTx chan<- types.Tx, size int64) {
case chTx <- tx:
// sleep for a bit before sending the
// next transaction.
waitTime := (25 * time.Millisecond) + time.Duration(rand.Int63n(int64(750*time.Millisecond))) // nolint: gosec
waitTime := (50 * time.Millisecond) + time.Duration(rand.Int63n(int64(time.Second))) // nolint: gosec
timer.Reset(waitTime)
}


Loading…
Cancel
Save