Refactored test

This commit is contained in:
Diptanu Choudhury 2015-11-05 17:33:03 -08:00
parent 3d5e02b3d7
commit c28702cb2d
1 changed files with 6 additions and 1 deletions

View File

@ -39,7 +39,12 @@ func TestTaskRunner_BatchRestartCounter(t *testing.T) {
attempts := 2
interval := 1 * time.Second
delay := 1 * time.Second
rt := newRestartTracker(structs.JobTypeBatch, &structs.RestartPolicy{Attempts: attempts, Interval: interval, Delay: delay})
rt := newRestartTracker(structs.JobTypeBatch,
&structs.RestartPolicy{Attempts: attempts,
Interval: interval,
Delay: delay,
},
)
for i := 0; i < attempts; i++ {
shouldRestart, when := rt.nextRestart()
if !shouldRestart {