diff --git a/agent/agent_test.go b/agent/agent_test.go index adc85ffe2f4c4..49fbb9f2e7468 100644 --- a/agent/agent_test.go +++ b/agent/agent_test.go @@ -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")