Commit fc3c6838 authored by rht's avatar rht
Browse files

Replace context.TODO in test files with context.Background



License: MIT
Signed-off-by: default avatarrht <rhtbot@gmail.com>
parent 71ef0279
......@@ -288,13 +288,13 @@ func TestAddrBlocking(t *testing.T) {
swarms[1].Filters.AddDialFilter(block)
swarms[1].peers.AddAddr(swarms[0].LocalPeer(), swarms[0].ListenAddresses()[0], peer.PermanentAddrTTL)
_, err = swarms[1].Dial(context.TODO(), swarms[0].LocalPeer())
_, err = swarms[1].Dial(ctx, swarms[0].LocalPeer())
if err == nil {
t.Fatal("dial should have failed")
}
swarms[0].peers.AddAddr(swarms[1].LocalPeer(), swarms[1].ListenAddresses()[0], peer.PermanentAddrTTL)
_, err = swarms[0].Dial(context.TODO(), swarms[1].LocalPeer())
_, err = swarms[0].Dial(ctx, swarms[1].LocalPeer())
if err == nil {
t.Fatal("dial should have failed")
}
......
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