test(agent): Increase the time to wait for agent reachable (#7245)

This commit is contained in:
Mathias Fredriksson
2023-04-21 22:40:17 +03:00
committed by GitHub
parent 501dfeedf7
commit 712098fa2b

View File

@ -1778,7 +1778,9 @@ func setupAgent(t *testing.T, metadata agentsdk.Manifest, ptyTimeout time.Durati
t.Cleanup(func() {
_ = agentConn.Close()
})
ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitMedium)
// Ideally we wouldn't wait too long here, but sometimes the the
// networking needs more time to resolve itself.
ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong)
defer cancel()
if !agentConn.AwaitReachable(ctx) {
t.Fatal("agent not reachable")