Skip to content

Stabilize Kubernetes create-recovery retry-delay tests - #20971

Open
Ankit Jain (radical) with Copilot wants to merge 5 commits into
mainfrom
copilot/fix-kubernetes-tests-timeout
Open

Ankit Jain (radical) with Copilot wants to merge 5 commits into
mainfrom
copilot/fix-kubernetes-tests-timeout

Conversation

Copilot AI commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Description

The Windows confirmation retry-delay test exhausts its 500 ms recovery budget before the fake server receives any requests, leaving the intended retry-delay behavior untested.

  • Setup isolation: Warm the actual Kubernetes client and connection with ListAsync before starting creation.
  • Timing margin: Increase both retry-delay theories’ recovery budgets to 5 seconds, still well below their server-requested delays.
  • Coverage preserved: Retain exact timeout and POST → GET assertions for numeric, int.MaxValue, and HTTP-date retry hints. No production behavior changes.

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No

Co-authored-by: radical <1472+radical@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix KubernetesServiceTests CreateAsync timeout issue on Windows Stabilize Kubernetes create-recovery retry-delay tests Oct 13, 2026
Comment thread tests/Aspire.Hosting.Tests/Dcp/KubernetesServiceTests.cs
Co-authored-by: danegsta <50252651+danegsta@users.noreply.github.com>
Comment thread tests/Aspire.Hosting.Tests/Dcp/KubernetesServiceTests.cs Outdated
Comment thread tests/Aspire.Hosting.Tests/Dcp/KubernetesServiceTests.cs Outdated
Co-authored-by: danegsta <50252651+danegsta@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 20971

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 20971"

@github-actions

This comment has been minimized.

@radical
Ankit Jain (radical) marked this pull request as ready for review October 13, 2026 22:56
@radical
Ankit Jain (radical) requested a balanced review from Copilot October 13, 2026 22:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The client warm-up is missing, and the recovery timeout becomes 30 seconds per case in CI rather than five seconds.

2 open findings
What changed in this PR

Stabilizes Kubernetes create-recovery timing tests by increasing timeout margins.

Changes:

  • Uses shared long watchdog timeouts.
  • Expands recovery budgets for both retry-delay theories.
  • Adds shared test-timeout constants import.
File Description
tests/​Aspire.Hosting.Tests/​Dcp/​KubernetesServiceTests.cs Adjusts retry-delay test timeout budgets.

🧠 Review effort: Balanced

Comment thread tests/Aspire.Hosting.Tests/Dcp/KubernetesServiceTests.cs
Comment thread tests/Aspire.Hosting.Tests/Dcp/KubernetesServiceTests.cs Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Tests selector

6 / 99 PR test projects · 0 PR jobs, from 1 changed file.

Selected PR test projects (6 / 99)

Aspire.Hosting.Azure.Kubernetes.Tests, Aspire.Hosting.Azure.Tests, Aspire.Hosting.Blazor.Tests, Aspire.Hosting.Dotnet.Tests, Aspire.Hosting.Radius.Tests, Aspire.Hosting.Tests

Selected PR jobs (0)

none


How these were chosen — grouped by what changed

🧪 tests/Aspire.Hosting.Tests/Dcp/KubernetesServiceTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Tests
→ 5 via the project graph: Aspire.Hosting.Azure.Kubernetes.Tests (2 hops), Aspire.Hosting.Azure.Tests, Aspire.Hosting.Blazor.Tests, Aspire.Hosting.Dotnet.Tests, Aspire.Hosting.Radius.Tests

Job reasons

none


Selection computed for commit 4ab2e2a.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[automated] [Failing test]: KubernetesServiceTests.CreateAsync_RecoveryBudgetIncludesConfirmationRetryDelay fails on Windows

4 participants