1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-09-15 18:57:01 +00:00

adopt t.Context() now that we're on go1.24; remove per-test explicit timeout

This commit is contained in:
Mathieu Fenniak 2025-08-21 09:21:20 -06:00 committed by Earl Warren
parent dded18c94d
commit 5a569d4ed1
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -192,7 +192,7 @@ func TestRunnerCacheConfiguration(t *testing.T) {
} }
t.Run("Cache accessible", func(t *testing.T) { t.Run("Cache accessible", func(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 3*time.Minute) ctx, cancel := context.WithCancel(t.Context())
defer cancel() defer cancel()
// Step 1: Populate shared cache with push workflow // Step 1: Populate shared cache with push workflow
@ -236,7 +236,7 @@ jobs:
}) })
t.Run("PR cache pollution prevented", func(t *testing.T) { t.Run("PR cache pollution prevented", func(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 3*time.Minute) ctx, cancel := context.WithCancel(t.Context())
defer cancel() defer cancel()
// Step 1: Populate shared cache with push workflow // Step 1: Populate shared cache with push workflow