Skip to content

Commit e236ec9

Browse files
committed
Push result to target result channel without ctx.Done() check to avoid race condition.
Signed-off-by: Ilya <[email protected]>
1 parent fbecf49 commit e236ec9

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

pkg/runner/test_runner.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -588,12 +588,9 @@ func (tr *TestRunner) reportTargetResult(ss *stepState, tgt *target.Target, res
588588
if err != nil {
589589
return err
590590
}
591-
select {
592-
case resCh <- res:
593-
break
594-
case <-ss.ctx.Done():
595-
break
596-
}
591+
592+
// As it has buffer size 1 and we process a single result for each target at a time
593+
resCh <- res
597594
return nil
598595
}
599596

0 commit comments

Comments
 (0)