build: in tests use t.Context, added in go1.24

This commit is contained in:
Nick Craig-Wood
2025-09-15 12:45:57 +01:00
parent 379dffa61c
commit d7aa37d263
+1 -2
View File
@@ -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)