package dataDownloadQueue import ( "errors" "testing" "fwh-toolbox-server/jobs" ) func TestShouldRetryItemSkipsEmsTimeout(t *testing.T) { if shouldRetryItem(jobs.ErrEmsLogCallTimeout, 0, 3) { t.Fatal("timed out EMS file should release the SN for the next file") } if shouldRetryItem(jobs.ErrEmsLogCallSlotLost, 0, 3) { t.Fatal("lost EMS call slot should not immediately summon again") } if !shouldRetryItem(errors.New("temporary fetch error"), 0, 3) { t.Fatal("unrelated transient failure should retain retries") } }