@@ -461,7 +461,7 @@ func TestTunnel_sendAgentUpdate(t *testing.T) {
461
461
}
462
462
463
463
// Latency is gathered in the background, so it'll eventually be sent
464
- require .Eventually (t , func () bool {
464
+ testutil .Eventually (ctx , t , func (ctx context. Context ) bool {
465
465
mClock .AdvanceNext ()
466
466
req = testutil .TryReceive (ctx , t , mgr .requests )
467
467
if len (req .msg .GetPeerUpdate ().UpsertedAgents ) == 0 {
@@ -474,7 +474,7 @@ func TestTunnel_sendAgentUpdate(t *testing.T) {
474
474
return false
475
475
}
476
476
return req .msg .GetPeerUpdate ().UpsertedAgents [0 ].LastPing .PreferredDerp == "Coder Region"
477
- }, testutil .WaitShort , testutil . IntervalFast )
477
+ }, testutil .IntervalFast )
478
478
479
479
// Upsert a new agent
480
480
err = tun .Update (tailnet.WorkspaceUpdate {
@@ -538,7 +538,7 @@ func TestTunnel_sendAgentUpdate(t *testing.T) {
538
538
require .Equal (t , hsTime , req .msg .GetPeerUpdate ().UpsertedAgents [0 ].LastHandshake .AsTime ())
539
539
540
540
// Eventually the second agent's latency is set
541
- require .Eventually (t , func () bool {
541
+ testutil .Eventually (ctx , t , func (ctx context. Context ) bool {
542
542
mClock .AdvanceNext ()
543
543
req = testutil .TryReceive (ctx , t , mgr .requests )
544
544
if len (req .msg .GetPeerUpdate ().UpsertedAgents ) == 0 {
@@ -551,7 +551,7 @@ func TestTunnel_sendAgentUpdate(t *testing.T) {
551
551
return false
552
552
}
553
553
return req .msg .GetPeerUpdate ().UpsertedAgents [0 ].LastPing .PreferredDerp == "Coder Region"
554
- }, testutil .WaitShort , testutil . IntervalFast )
554
+ }, testutil .IntervalFast )
555
555
}
556
556
557
557
func TestTunnel_sendAgentUpdateReconnect (t * testing.T ) {
0 commit comments