File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -125,13 +125,7 @@ func Start(tests []TestCase, maxConcurrent int) <-chan TestResult {
125125 break
126126 }
127127
128- if t .Command .GetRetries () > 1 && t .Command .Interval != "" {
129- interval , err := time .ParseDuration (t .Command .Interval )
130- if err != nil {
131- panic (fmt .Sprintf ("'%s' interval error: %s" , t .Command .Cmd , err ))
132- }
133- time .Sleep (interval )
134- }
128+ executeRetryInterval (t )
135129 }
136130
137131 out <- result
@@ -147,6 +141,16 @@ func Start(tests []TestCase, maxConcurrent int) <-chan TestResult {
147141 return out
148142}
149143
144+ func executeRetryInterval (t TestCase ) {
145+ if t .Command .GetRetries () > 1 && t .Command .Interval != "" {
146+ interval , err := time .ParseDuration (t .Command .Interval )
147+ if err != nil {
148+ panic (fmt .Sprintf ("'%s' interval error: %s" , t .Command .Cmd , err ))
149+ }
150+ time .Sleep (interval )
151+ }
152+ }
153+
150154// runTest executes the current test case
151155func runTest (test TestCase ) TestResult {
152156 // cut = command under test
You can’t perform that action at this time.
0 commit comments