@@ -103,7 +103,7 @@ func TestSessionGetBlocks(t *testing.T) {
103
103
notif := notifications .New ()
104
104
defer notif .Shutdown ()
105
105
id := testutil .GenerateSessionID ()
106
- session := New (ctx , id , fspm , fpf , sim , fpm , bpm , notif , time .Second , delay .Fixed (time .Minute ), "" )
106
+ session := New (ctx , ctx , id , fspm , fpf , sim , fpm , bpm , notif , time .Second , delay .Fixed (time .Minute ), "" )
107
107
blockGenerator := blocksutil .NewBlockGenerator ()
108
108
blks := blockGenerator .Blocks (broadcastLiveWantsLimit * 2 )
109
109
var cids []cid.Cid
@@ -198,7 +198,7 @@ func TestSessionFindMorePeers(t *testing.T) {
198
198
notif := notifications .New ()
199
199
defer notif .Shutdown ()
200
200
id := testutil .GenerateSessionID ()
201
- session := New (ctx , id , fspm , fpf , sim , fpm , bpm , notif , time .Second , delay .Fixed (time .Minute ), "" )
201
+ session := New (ctx , ctx , id , fspm , fpf , sim , fpm , bpm , notif , time .Second , delay .Fixed (time .Minute ), "" )
202
202
session .SetBaseTickDelay (200 * time .Microsecond )
203
203
blockGenerator := blocksutil .NewBlockGenerator ()
204
204
blks := blockGenerator .Blocks (broadcastLiveWantsLimit * 2 )
@@ -272,7 +272,7 @@ func TestSessionOnPeersExhausted(t *testing.T) {
272
272
notif := notifications .New ()
273
273
defer notif .Shutdown ()
274
274
id := testutil .GenerateSessionID ()
275
- session := New (ctx , id , fspm , fpf , sim , fpm , bpm , notif , time .Second , delay .Fixed (time .Minute ), "" )
275
+ session := New (ctx , ctx , id , fspm , fpf , sim , fpm , bpm , notif , time .Second , delay .Fixed (time .Minute ), "" )
276
276
blockGenerator := blocksutil .NewBlockGenerator ()
277
277
blks := blockGenerator .Blocks (broadcastLiveWantsLimit + 5 )
278
278
var cids []cid.Cid
@@ -316,7 +316,7 @@ func TestSessionFailingToGetFirstBlock(t *testing.T) {
316
316
notif := notifications .New ()
317
317
defer notif .Shutdown ()
318
318
id := testutil .GenerateSessionID ()
319
- session := New (ctx , id , fspm , fpf , sim , fpm , bpm , notif , 10 * time .Millisecond , delay .Fixed (100 * time .Millisecond ), "" )
319
+ session := New (ctx , ctx , id , fspm , fpf , sim , fpm , bpm , notif , 10 * time .Millisecond , delay .Fixed (100 * time .Millisecond ), "" )
320
320
blockGenerator := blocksutil .NewBlockGenerator ()
321
321
blks := blockGenerator .Blocks (4 )
322
322
var cids []cid.Cid
@@ -431,7 +431,7 @@ func TestSessionCtxCancelClosesGetBlocksChannel(t *testing.T) {
431
431
432
432
// Create a new session with its own context
433
433
sessctx , sesscancel := context .WithTimeout (context .Background (), 100 * time .Millisecond )
434
- session := New (sessctx , id , fspm , fpf , sim , fpm , bpm , notif , time .Second , delay .Fixed (time .Minute ), "" )
434
+ session := New (context . Background (), sessctx , id , fspm , fpf , sim , fpm , bpm , notif , time .Second , delay .Fixed (time .Minute ), "" )
435
435
436
436
timerCtx , timerCancel := context .WithTimeout (context .Background (), 10 * time .Millisecond )
437
437
defer timerCancel ()
@@ -472,7 +472,7 @@ func TestSessionReceiveMessageAfterShutdown(t *testing.T) {
472
472
notif := notifications .New ()
473
473
defer notif .Shutdown ()
474
474
id := testutil .GenerateSessionID ()
475
- session := New (ctx , id , fspm , fpf , sim , fpm , bpm , notif , time .Second , delay .Fixed (time .Minute ), "" )
475
+ session := New (ctx , ctx , id , fspm , fpf , sim , fpm , bpm , notif , time .Second , delay .Fixed (time .Minute ), "" )
476
476
blockGenerator := blocksutil .NewBlockGenerator ()
477
477
blks := blockGenerator .Blocks (2 )
478
478
cids := []cid.Cid {blks [0 ].Cid (), blks [1 ].Cid ()}
0 commit comments