@@ -442,9 +442,9 @@ func TestPGCoordinatorDual_Mainline(t *testing.T) {
442
442
require .NoError (t , err )
443
443
defer coord2 .Close ()
444
444
445
- agent1 := agpltest .NewAgent (ctx , t , coord1 , "agent " )
445
+ agent1 := agpltest .NewAgent (ctx , t , coord1 , "agent1 " )
446
446
defer agent1 .Close (ctx )
447
- t .Logf ("agent =%s" , agent1 .ID )
447
+ t .Logf ("agent1 =%s" , agent1 .ID )
448
448
agent2 := agpltest .NewAgent (ctx , t , coord2 , "agent2" )
449
449
defer agent2 .Close (ctx )
450
450
t .Logf ("agent2=%s" , agent2 .ID )
@@ -483,7 +483,7 @@ func TestPGCoordinatorDual_Mainline(t *testing.T) {
483
483
client12 .UpdateDERP (12 )
484
484
agent2 .AssertEventuallyHasDERP (client12 .ID , 12 )
485
485
486
- t .Logf ("agent -> Node 1" )
486
+ t .Logf ("agent1 -> Node 1" )
487
487
agent1 .UpdateDERP (1 )
488
488
client21 .AssertEventuallyHasDERP (agent1 .ID , 1 )
489
489
client11 .AssertEventuallyHasDERP (agent1 .ID , 1 )
@@ -502,7 +502,7 @@ func TestPGCoordinatorDual_Mainline(t *testing.T) {
502
502
503
503
err = coord1 .Close ()
504
504
require .NoError (t , err )
505
- // this closes agent , client12, client11
505
+ // this closes agent1 , client12, client11
506
506
agent1 .AssertEventuallyResponsesClosed ()
507
507
client12 .AssertEventuallyResponsesClosed ()
508
508
client11 .AssertEventuallyResponsesClosed ()
@@ -543,7 +543,7 @@ func TestPGCoordinator_MultiCoordinatorAgent(t *testing.T) {
543
543
require .NoError (t , err )
544
544
defer coord3 .Close ()
545
545
546
- agent1 := agpltest .NewAgent (ctx , t , coord1 , "agent " )
546
+ agent1 := agpltest .NewAgent (ctx , t , coord1 , "agent1 " )
547
547
defer agent1 .Close (ctx )
548
548
agent2 := agpltest .NewPeer (ctx , t , coord2 , "agent2" ,
549
549
agpltest .WithID (agent1 .ID ), agpltest .WithAuth (agpl.AgentCoordinateeAuth {ID : agent1 .ID }),
@@ -560,11 +560,11 @@ func TestPGCoordinator_MultiCoordinatorAgent(t *testing.T) {
560
560
agent1 .UpdateDERP (1 )
561
561
client .AssertEventuallyHasDERP (agent1 .ID , 1 )
562
562
563
- // agent2's update overrides agent because it is newer
563
+ // agent2's update overrides agent1 because it is newer
564
564
agent2 .UpdateDERP (2 )
565
565
client .AssertEventuallyHasDERP (agent1 .ID , 2 )
566
566
567
- // agent2 disconnects, and we should revert back to agent
567
+ // agent2 disconnects, and we should revert back to agent1
568
568
agent2 .Close (ctx )
569
569
client .AssertEventuallyHasDERP (agent1 .ID , 1 )
570
570
@@ -625,8 +625,8 @@ func TestPGCoordinator_Unhealthy(t *testing.T) {
625
625
err := uut .Close ()
626
626
require .NoError (t , err )
627
627
}()
628
- agent := agpltest .NewAgent (ctx , t , uut , "agent " )
629
- defer agent .Close (ctx )
628
+ agent1 := agpltest .NewAgent (ctx , t , uut , "agent1 " )
629
+ defer agent1 .Close (ctx )
630
630
for i := 0 ; i < 3 ; i ++ {
631
631
select {
632
632
case <- ctx .Done ():
@@ -636,7 +636,7 @@ func TestPGCoordinator_Unhealthy(t *testing.T) {
636
636
}
637
637
}
638
638
// connected agent should be disconnected
639
- agent .AssertEventuallyResponsesClosed ()
639
+ agent1 .AssertEventuallyResponsesClosed ()
640
640
641
641
// new agent should immediately disconnect
642
642
agent2 := agpltest .NewAgent (ctx , t , uut , "agent2" )
0 commit comments