We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 87e0e9f + 6ab9a19 commit 306c92bCopy full SHA for 306c92b
1 file changed
pkg/runner/step_state.go
@@ -145,13 +145,18 @@ func (ss *stepState) Run(ctx xcontext.Context) error {
145
146
go func() {
147
defer func() {
148
+ // There could be a race condition when due to error in step runner, TestRunner gets the error earlier
149
+ // than it is propagated here and cancels stepCtx
150
+ if runErr := ss.stepRunner.getErr(); runErr != nil {
151
+ ss.SetError(ctx, runErr)
152
+ }
153
close(ss.stopped)
154
stepCtx.Debugf("StepRunner fully stopped")
155
}()
156
157
select {
158
case stepErr := <-stepRunResult.NotifyCh():
- ss.SetError(stepCtx, stepErr)
159
+ ss.SetError(ctx, stepErr)
160
case <-stepCtx.Done():
161
stepCtx.Debugf("Cancelled step context during waiting for step run result")
162
}
0 commit comments