From 8e779fa608459db9a02b2900972eb02acc60ac66 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 10 Nov 2023 12:53:10 +0100 Subject: [PATCH] fix: handle context cancellations in txsim (backport #2830) (#2833) This is an automatic backport of pull request #2830 done by [Mergify](https://mergify.com). ---
Mergify commands and options
More conditions and actions can be found in the [documentation](https://docs.mergify.com/). You can also trigger Mergify actions by commenting on this pull request: - `@Mergifyio refresh` will re-evaluate the rules - `@Mergifyio rebase` will rebase this PR on its base branch - `@Mergifyio update` will merge the base branch into this PR - `@Mergifyio backport ` will backport this PR on `` branch Additionally, on Mergify [dashboard](https://dashboard.mergify.com) you can: - look at your merge queues - generate the Mergify configuration with the config editor. Finally, you can contact us on https://mergify.com
Co-authored-by: Callum Waters --- test/txsim/run.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/txsim/run.go b/test/txsim/run.go index d7dae27118..12cbfa0462 100644 --- a/test/txsim/run.go +++ b/test/txsim/run.go @@ -98,9 +98,16 @@ func Run( log.Info().Err(err).Msg("sequence terminated") continue } + if errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) { + continue + } log.Error().Err(err).Msg("sequence failed") finalErr = err } + if ctx.Err() != nil { + return ctx.Err() + } + return finalErr }