Replace context.Background with testing.TB.Context where possible (#15416)

* Replace context.Background with testing.TB.Context where possible

* Fix failing tests
This commit is contained in:
Preston Van Loon
2025-06-16 17:09:18 -05:00
committed by GitHub
parent 6a13ba9125
commit 62fec4d1f3
409 changed files with 3175 additions and 3456 deletions

View File

@@ -16,7 +16,7 @@ func TestLRU_Concurrency(t *testing.T) {
if err != nil {
t.Fatalf("err: %v", err)
}
ctx, cancel := context.WithTimeout(context.Background(), time.Second*2)
ctx, cancel := context.WithTimeout(t.Context(), time.Second*2)
defer cancel()
for i := 0; i < 100; i++ {
go func(j int) {