Skip to content

Commit

Permalink
Merge #41354
Browse files Browse the repository at this point in the history
41354: workload: don't panic on limiter error r=nvanbenschoten a=nvanbenschoten

`limiter.Wait` can throw the error `Wait(n=1) would exceed context deadline`
if it is asked to wait for longer than a context deadline. This seems to
happen reliably with a workload wait of 2m. There's no reason we need to
turn this into an panic.

Release justification: Testing only.

Release note: None

Co-authored-by: Nathan VanBenschoten <nvanbenschoten@gmail.com>
  • Loading branch information
craig[bot] and nvanbenschoten committed Oct 7, 2019
2 parents 236862d + 2034c5b commit 9eb0259
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/workload/cli/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,7 @@ func workerRun(
// Limit how quickly the load generator sends requests based on --max-rate.
if limiter != nil {
if err := limiter.Wait(ctx); err != nil {
if err == ctx.Err() {
return
}
panic(err)
return
}
}

Expand Down

0 comments on commit 9eb0259

Please sign in to comment.