From 0f55e2ad3505e41eb9c1f2f50fbbec0e81326b6c Mon Sep 17 00:00:00 2001 From: Barkhayot Juraev Date: Wed, 28 Jan 2026 21:32:41 +0900 Subject: [PATCH] fix: remove iteration param based on feedbacks --- job_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/job_test.go b/job_test.go index 6ef2426..33b5b0e 100644 --- a/job_test.go +++ b/job_test.go @@ -609,14 +609,14 @@ func TestJob_NextRuns(t *testing.T) { tests := []struct { name string jd JobDefinition - assertion func(t *testing.T, iteration int, previousRun, nextRun time.Time) + assertion func(t *testing.T, previousRun, nextRun time.Time) }{ { "simple - milliseconds", DurationJob( 100 * time.Millisecond, ), - func(t *testing.T, _ int, previousRun, nextRun time.Time) { + func(t *testing.T, previousRun, nextRun time.Time) { assert.Equal(t, previousRun.UnixMilli()+100, nextRun.UnixMilli()) }, }, @@ -629,7 +629,7 @@ func TestJob_NextRuns(t *testing.T) { NewAtTime(0, 0, 0), ), ), - func(t *testing.T, iteration int, previousRun, nextRun time.Time) { + func(t *testing.T, previousRun, nextRun time.Time) { // With the fix for NextRun accuracy, the immediate run (Jan 1) is removed // from nextScheduled after it completes. So all intervals should be 14 days // (2 weeks as configured). @@ -670,7 +670,7 @@ func TestJob_NextRuns(t *testing.T) { // skipping because there is no previous run continue } - tt.assertion(t, i, nextRuns[i-1], nextRuns[i]) + tt.assertion(t, nextRuns[i-1], nextRuns[i]) } assert.NoError(t, s.Shutdown())