Skip to content

Commit

Permalink
Fix Teardown context for cleanup on timeout
Browse files Browse the repository at this point in the history
Before this change, if the passed Run() context timed out, the
Teardown() would time out immediately, so as we want to do the
cleanup in the timeout case, the context was changed accordingly.

Signed-off-by: Arnon Gilboa <[email protected]>
  • Loading branch information
arnongilboa committed Mar 27, 2024
1 parent 77a9ace commit da6161f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/internal/launcher/launcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (l Launcher) Run(ctx context.Context) (runErr error) {
}

defer func() {
if err := l.checkup.Teardown(ctx); err != nil {
if err := l.checkup.Teardown(context.Background()); err != nil {
runStatus.FailureReason = append(runStatus.FailureReason, err.Error())
}
}()
Expand Down

0 comments on commit da6161f

Please sign in to comment.