Commit 75d6f9ce authored by rht's avatar rht

Replace context.TODO in test files with context.Background

License: MIT
Signed-off-by: default avatarrht <rhtbot@gmail.com>
parent 31d8527e
......@@ -42,7 +42,7 @@ func TestBlocks(t *testing.T) {
t.Error("returned key is not equal to block key", err)
}
ctx, cancel := context.WithTimeout(context.TODO(), time.Second*5)
ctx, cancel := context.WithTimeout(context.Background(), time.Second*5)
defer cancel()
b2, err := bs.GetBlock(ctx, b.Key())
if err != nil {
......@@ -76,7 +76,7 @@ func TestGetBlocksSequential(t *testing.T) {
t.Log("one instance at a time, get blocks concurrently")
for i := 1; i < len(servs); i++ {
ctx, cancel := context.WithTimeout(context.TODO(), time.Second*50)
ctx, cancel := context.WithTimeout(context.Background(), time.Second*50)
defer cancel()
out := servs[i].GetBlocks(ctx, keys)
gotten := make(map[key.Key]*blocks.Block)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment