Skip to content

Commit

Permalink
Merge pull request #41 from jaypipes/panic-at-the-disco
Browse files Browse the repository at this point in the history
calculate timeout before doing wait.before
  • Loading branch information
jaypipes committed Jun 26, 2024
2 parents d96570d + 3cee839 commit d0660bd
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions scenario/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,6 @@ func (s *Scenario) Run(ctx context.Context, t *testing.T) error {
specCtx = gdtcontext.PopTrace(specCtx)
}

wait := sb.Wait
if wait != nil && wait.Before != "" {
debug.Println(specCtx, "wait: %s before", wait.Before)
time.Sleep(wait.BeforeDuration())
}
plugin := s.evalPlugins[idx]

rt := getRetry(specCtx, scDefaults, plugin, spec)
Expand All @@ -103,6 +98,12 @@ func (s *Scenario) Run(ctx context.Context, t *testing.T) error {
var res *api.Result
ch := make(chan runSpecRes, 1)

wait := sb.Wait
if wait != nil && wait.Before != "" {
debug.Println(specCtx, "wait: %s before", wait.Before)
time.Sleep(wait.BeforeDuration())
}

go s.runSpec(specCtx, ch, rt, idx, spec)

select {
Expand Down

0 comments on commit d0660bd

Please sign in to comment.