mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 13:28:01 -05:00
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:
2
cache/nonblocking/lru_test.go
vendored
2
cache/nonblocking/lru_test.go
vendored
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user