diff --git a/internal/maintenance/job_scheduler_test.go b/internal/maintenance/job_scheduler_test.go index e4671246..76adb0cd 100644 --- a/internal/maintenance/job_scheduler_test.go +++ b/internal/maintenance/job_scheduler_test.go @@ -27,13 +27,13 @@ func TestJobScheduler(t *testing.T) { notificationsByQueue map[string]int } - setup := func(t *testing.T, ex riverdriver.Executor) (*JobScheduler, *testBundle) { + setup := func(t *testing.T, exec riverdriver.Executor) (*JobScheduler, *testBundle) { t.Helper() archetype := riverinternaltest.BaseServiceArchetype(t) bundle := &testBundle{ - exec: ex, + exec: exec, notificationsByQueue: make(map[string]int), } diff --git a/internal/maintenance/periodic_job_enqueuer_test.go b/internal/maintenance/periodic_job_enqueuer_test.go index dd455a79..d399e720 100644 --- a/internal/maintenance/periodic_job_enqueuer_test.go +++ b/internal/maintenance/periodic_job_enqueuer_test.go @@ -2,6 +2,7 @@ package maintenance import ( "context" + "errors" "fmt" "sync" "testing" @@ -568,7 +569,7 @@ func TestPeriodicJobEnqueuer(t *testing.T) { }) svc.Config.NotifyInsert = func(ctx context.Context, execTx riverdriver.ExecutorTx, queues []string) error { - return fmt.Errorf("test error") + return errors.New("test error") } startService(t, svc)