Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Commit

Permalink
Review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rojer9-fb committed Jan 26, 2021
1 parent 030780a commit 7d45d6c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pkg/runner/test_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,15 +378,12 @@ func (tr *TestRunner) injectTarget(ctx statectx.Context, ts *targetState, ss *st
// Injected successfully.
err := ss.ev.Emit(testevent.Data{EventName: target.EventTargetIn, Target: ts.tgt})
tr.mu.Lock()
defer tr.mu.Unlock()
ts.CurPhase = targetStepPhaseRun
if err != nil {
return fmt.Errorf("failed to report target injection: %w", err)
}
tr.mu.Unlock()
tr.cond.Signal()
if err != nil {
return err
}
case <-time.After(tr.stepInjectTimeout):
ss.log.Errorf("timed out while injecting a target")
if err := ss.ev.Emit(testevent.Data{EventName: target.EventTargetInErr, Target: ts.tgt}); err != nil {
Expand Down Expand Up @@ -742,7 +739,7 @@ loop:
if ts.resCh == nil { // Not running anymore
continue
}
if ok && (ts.CurStep < step || ts.CurPhase < targetStepPhaseRun) {
if ts.CurStep < step || ts.CurPhase < targetStepPhaseRun {
tr.log.Debugf("monitor pass %d: %s: not all targets injected yet (%s)", pass, ss, ts)
ok = false
break
Expand Down

0 comments on commit 7d45d6c

Please sign in to comment.