Refactored test

This commit is contained in:
Diptanu Choudhury 2015-11-05 17:33:03 -08:00
parent 3d5e02b3d7
commit c28702cb2d

View file

@ -39,7 +39,12 @@ func TestTaskRunner_BatchRestartCounter(t *testing.T) {
attempts := 2 attempts := 2
interval := 1 * time.Second interval := 1 * time.Second
delay := 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++ { for i := 0; i < attempts; i++ {
shouldRestart, when := rt.nextRestart() shouldRestart, when := rt.nextRestart()
if !shouldRestart { if !shouldRestart {