1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-09 19:32:24 +08:00

Replace context.TODO in test files with context.Background

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
This commit is contained in:
rht
2015-08-23 19:55:45 +07:00
parent fcf915fc47
commit 30e03b2da6
12 changed files with 30 additions and 28 deletions

View File

@ -45,7 +45,7 @@ func TestBalancedDag(t *testing.T) {
t.Fatal(err)
}
dr, err := uio.NewDagReader(context.TODO(), nd, ds)
dr, err := uio.NewDagReader(context.Background(), nd, ds)
if err != nil {
t.Fatal(err)
}
@ -102,7 +102,7 @@ func BenchmarkTrickleReadFull(b *testing.B) {
func runReadBench(b *testing.B, nd *dag.Node, ds dag.DAGService) {
for i := 0; i < b.N; i++ {
ctx, cancel := context.WithCancel(context.TODO())
ctx, cancel := context.WithCancel(context.Background())
read, err := uio.NewDagReader(ctx, nd, ds)
if err != nil {
b.Fatal(err)