Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions scenario/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,6 @@ func (s *Scenario) runExternal(ctx context.Context, run *run.Run) error {
}
}

var runErr error

scenCleanups := []func(){}
scenOK := true
outer:
Expand All @@ -123,8 +121,7 @@ outer:
ctx = gdtcontext.SetTestUnit(ctx, tu)
res, err := s.runSpec(ctx, tu, idx)
if err != nil {
runErr = err
break
return err
}

scenCleanups = append(scenCleanups, res.Cleanups()...)
Expand Down Expand Up @@ -154,7 +151,7 @@ outer:
cleanup()
}
}
return runErr
return nil
}

// runGo executes the scenario using the `go test` tool as the underlying test
Expand Down Expand Up @@ -286,7 +283,13 @@ func (s *Scenario) runSpec(

select {
case <-specCtx.Done():
t.Fatalf("assertion failed: timeout exceeded (%s)", to.After)
fail := fmt.Errorf(
"assertion failed: timeout exceeded (%s)", to.After,
)
res = api.NewResult(
api.WithFailures(fail),
)
err = nil
case runres := <-ch:
res = runres.r
err = runres.err
Expand Down
Loading