@@ -272,13 +272,13 @@ func TestBlockingSelect(t *testing.T) {
272
272
Go (ctx , func (ctx Context ) {
273
273
history = append (history , "add-one" )
274
274
c1 .Send (ctx , "one" )
275
- history = append (history , "add-one-done " )
275
+ history = append (history , "add-one-stopped " )
276
276
277
277
})
278
278
Go (ctx , func (ctx Context ) {
279
279
history = append (history , "add-two" )
280
280
c2 .Send (ctx , "two" )
281
- history = append (history , "add-two-done " )
281
+ history = append (history , "add-two-stopped " )
282
282
})
283
283
284
284
s := NewSelector (ctx )
@@ -298,21 +298,21 @@ func TestBlockingSelect(t *testing.T) {
298
298
s .Select (ctx )
299
299
history = append (history , "select2" )
300
300
s .Select (ctx )
301
- history = append (history , "done " )
301
+ history = append (history , "stopped " )
302
302
})
303
303
require .NoError (t , d .ExecuteUntilAllBlocked ())
304
304
require .True (t , d .IsDone (), strings .Join (history , "\n " ))
305
305
306
306
expected := []string {
307
307
"select1" ,
308
308
"add-one" ,
309
- "add-one-done " ,
309
+ "add-one-stopped " ,
310
310
"add-two" ,
311
311
"c1-one" ,
312
312
"select2" ,
313
313
"c2-two" ,
314
- "done " ,
315
- "add-two-done " ,
314
+ "stopped " ,
315
+ "add-two-stopped " ,
316
316
}
317
317
require .EqualValues (t , expected , history )
318
318
}
@@ -339,7 +339,7 @@ func TestBlockingSelectAsyncSend(t *testing.T) {
339
339
history = append (history , fmt .Sprintf ("select-%v" , ii ))
340
340
s .Select (ctx )
341
341
}
342
- history = append (history , "done " )
342
+ history = append (history , "stopped " )
343
343
})
344
344
require .NoError (t , d .ExecuteUntilAllBlocked ())
345
345
require .True (t , d .IsDone (), strings .Join (history , "\n " ))
@@ -354,7 +354,7 @@ func TestBlockingSelectAsyncSend(t *testing.T) {
354
354
"select-2" ,
355
355
"add-2" ,
356
356
"c1-2" ,
357
- "done " ,
357
+ "stopped " ,
358
358
}
359
359
require .EqualValues (t , expected , history )
360
360
}
@@ -429,7 +429,7 @@ func TestBlockingSelectAsyncSend2(t *testing.T) {
429
429
c1 .SendAsync ("s1" )
430
430
history = append (history , "select-1" )
431
431
s .Select (ctx )
432
- history = append (history , "done " )
432
+ history = append (history , "stopped " )
433
433
})
434
434
require .NoError (t , d .ExecuteUntilAllBlocked ())
435
435
require .True (t , d .IsDone (), strings .Join (history , "\n " ))
@@ -441,7 +441,7 @@ func TestBlockingSelectAsyncSend2(t *testing.T) {
441
441
"send-s1" ,
442
442
"select-1" ,
443
443
"c1-s1" ,
444
- "done " ,
444
+ "stopped " ,
445
445
}
446
446
require .EqualValues (t , expected , history )
447
447
}
@@ -469,7 +469,7 @@ func TestSendSelect(t *testing.T) {
469
469
s .Select (ctx )
470
470
history = append (history , "select2" )
471
471
s .Select (ctx )
472
- history = append (history , "done " )
472
+ history = append (history , "stopped " )
473
473
})
474
474
require .NoError (t , d .ExecuteUntilAllBlocked ())
475
475
require .True (t , d .IsDone ())
@@ -481,7 +481,7 @@ func TestSendSelect(t *testing.T) {
481
481
"send2" ,
482
482
"select2" ,
483
483
"send1" ,
484
- "done " ,
484
+ "stopped " ,
485
485
"c1-one" ,
486
486
}
487
487
require .EqualValues (t , expected , history )
@@ -511,7 +511,7 @@ func TestSendSelectWithAsyncReceive(t *testing.T) {
511
511
s .Select (ctx )
512
512
history = append (history , "select2" )
513
513
s .Select (ctx )
514
- history = append (history , "done " )
514
+ history = append (history , "stopped " )
515
515
})
516
516
require .NoError (t , d .ExecuteUntilAllBlocked ())
517
517
require .True (t , d .IsDone (), strings .Join (history , "\n " ))
@@ -523,7 +523,7 @@ func TestSendSelectWithAsyncReceive(t *testing.T) {
523
523
"send2" ,
524
524
"select2" ,
525
525
"send1" ,
526
- "done " ,
526
+ "stopped " ,
527
527
"c1-one" ,
528
528
}
529
529
require .EqualValues (t , expected , history )
@@ -533,7 +533,7 @@ func TestChannelClose(t *testing.T) {
533
533
var history []string
534
534
d , _ := newDispatcher (createRootTestContext (t ), func (ctx Context ) {
535
535
jobs := NewBufferedChannel (ctx , 5 )
536
- done := NewNamedChannel (ctx , "done " )
536
+ done := NewNamedChannel (ctx , "stopped " )
537
537
538
538
GoNamed (ctx , "receiver" , func (ctx Context ) {
539
539
for {
@@ -555,7 +555,7 @@ func TestChannelClose(t *testing.T) {
555
555
jobs .Close ()
556
556
history = append (history , "sent all jobs" )
557
557
done .Receive (ctx , nil )
558
- history = append (history , "done " )
558
+ history = append (history , "stopped " )
559
559
560
560
})
561
561
require .EqualValues (t , 0 , len (history ))
@@ -571,7 +571,7 @@ func TestChannelClose(t *testing.T) {
571
571
"received job 2" ,
572
572
"received job 3" ,
573
573
"received all jobs" ,
574
- "done " ,
574
+ "stopped " ,
575
575
}
576
576
require .EqualValues (t , expected , history )
577
577
}
@@ -987,7 +987,7 @@ func TestSelectFuture(t *testing.T) {
987
987
s .Select (ctx )
988
988
history = append (history , "select2" )
989
989
s .Select (ctx )
990
- history = append (history , "done " )
990
+ history = append (history , "stopped " )
991
991
})
992
992
require .NoError (t , d .ExecuteUntilAllBlocked ())
993
993
require .True (t , d .IsDone ())
@@ -999,7 +999,7 @@ func TestSelectFuture(t *testing.T) {
999
999
"c1-one" ,
1000
1000
"select2" ,
1001
1001
"c2-two" ,
1002
- "done " ,
1002
+ "stopped " ,
1003
1003
}
1004
1004
require .EqualValues (t , expected , history )
1005
1005
}
@@ -1036,7 +1036,7 @@ func TestSelectDecodeFuture(t *testing.T) {
1036
1036
s .Select (ctx )
1037
1037
history = append (history , "select2" )
1038
1038
s .Select (ctx )
1039
- history = append (history , "done " )
1039
+ history = append (history , "stopped " )
1040
1040
})
1041
1041
require .NoError (t , d .ExecuteUntilAllBlocked ())
1042
1042
require .True (t , d .IsDone ())
@@ -1048,7 +1048,7 @@ func TestSelectDecodeFuture(t *testing.T) {
1048
1048
"c1-one" ,
1049
1049
"select2" ,
1050
1050
"c2-two" ,
1051
- "done " ,
1051
+ "stopped " ,
1052
1052
}
1053
1053
require .EqualValues (t , expected , history )
1054
1054
}
0 commit comments