From d7aa37d26323f0a395d8e2887c6752e25d123b46 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sun, 14 Sep 2025 16:04:43 +0100 Subject: [PATCH] build: in tests use t.Context, added in go1.24 --- fs/rc/jobs/job_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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)