Skip to content

Commit

Permalink
Push result to target result channel without ctx.Done() check to avoi…
Browse files Browse the repository at this point in the history
…d race condition.

Signed-off-by: Ilya <[email protected]>
  • Loading branch information
rihter007 committed Nov 26, 2021
1 parent dbc7f9d commit 40d3afd
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions pkg/runner/test_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -588,12 +588,9 @@ func (tr *TestRunner) reportTargetResult(ss *stepState, tgt *target.Target, res
if err != nil {
return err
}
select {
case resCh <- res:
break
case <-ss.ctx.Done():
break
}

// As it has buffer size 1 and we process a single result for each target at a time
resCh <- res
return nil
}

Expand Down

0 comments on commit 40d3afd

Please sign in to comment.