Skip to content

Commit d0660bd

Browse files
authored
Merge pull request #41 from jaypipes/panic-at-the-disco
calculate timeout before doing wait.before
2 parents d96570d + 3cee839 commit d0660bd

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

scenario/run.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,6 @@ func (s *Scenario) Run(ctx context.Context, t *testing.T) error {
8686
specCtx = gdtcontext.PopTrace(specCtx)
8787
}
8888

89-
wait := sb.Wait
90-
if wait != nil && wait.Before != "" {
91-
debug.Println(specCtx, "wait: %s before", wait.Before)
92-
time.Sleep(wait.BeforeDuration())
93-
}
9489
plugin := s.evalPlugins[idx]
9590

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

101+
wait := sb.Wait
102+
if wait != nil && wait.Before != "" {
103+
debug.Println(specCtx, "wait: %s before", wait.Before)
104+
time.Sleep(wait.BeforeDuration())
105+
}
106+
106107
go s.runSpec(specCtx, ch, rt, idx, spec)
107108

108109
select {

0 commit comments

Comments
 (0)