File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 11package chunk
22
33import (
4+ "context"
45 "sync/atomic"
56 "testing"
67 "time"
@@ -15,7 +16,7 @@ func TestPrefetcher(t *testing.T) {
1516 chRes <- k + "Done"
1617 })
1718 for _ , k := range keys {
18- f .fetch (k )
19+ f .fetch (context . TODO (), k )
1920 }
2021 res := make (map [string ]bool , len (keys ))
2122 for range keys {
@@ -39,7 +40,7 @@ func TestPrefetcher(t *testing.T) {
3940 atomic .AddInt32 (& counter , 1 )
4041 })
4142 for i := 0 ; i < 5 ; i ++ {
42- f .fetch ("a" )
43+ f .fetch (context . TODO (), "a" )
4344 }
4445 if atomic .LoadInt32 (& counter ) > 1 {
4546 t .Errorf ("Duplicate keys fetched" )
@@ -56,7 +57,7 @@ func TestPrefetcher(t *testing.T) {
5657 })
5758
5859 for i := 0 ; i < maxPending + 1 ; i ++ {
59- f .fetch (string (rune ('a' + i )))
60+ f .fetch (context . TODO (), string (rune ('a' + i )))
6061 }
6162
6263 time .Sleep (50 * time .Millisecond )
You can’t perform that action at this time.
0 commit comments