diff --git a/fs/rc/jobs/job_test.go b/fs/rc/jobs/job_test.go index dcce3879b..f0799200c 100644 --- a/fs/rc/jobs/job_test.go +++ b/fs/rc/jobs/job_test.go @@ -539,8 +539,7 @@ func TestOnFinish(t *testing.T) { func TestOnFinishAlreadyFinished(t *testing.T) { jobID.Store(0) done := make(chan struct{}) - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() + ctx := t.Context() job, _, err := NewJob(ctx, shortFn, rc.Params{}) assert.NoError(t, err)