Skip to content

[test-quarantine] Stabilize DelegateTests.DelegateAfterReceiverRestart Quarantine test - #68131

Merged
kotlarmilos merged 13 commits into
dotnet:mainfrom
karmegams02:60141_testfailure
Nov 11, 2026
Merged

kotlarmilos merged 13 commits into
dotnet:mainfrom
karmegams02:60141_testfailure

Conversation

@karmegams02

@karmegams02 karmegams02 commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

Stabilize DelegateTests.DelegateAfterReceiverRestart

Description

Ensure request delegation continues working after the receiver restarts by keeping the destination request queue alive throughout the test.

Root cause

Delegation handles alone do not retain the destination request queue. Stopping the receiver can delete the queue, leaving the delegation handle referencing a deleted object and causing HTTP 500 responses.

Fix

  • Retain a controller handle to keep the named request queue alive across receiver restarts.
  • Configure both receivers with CreateOrAttach to use the retained queue.
  • Assert that the restarted receiver attaches to the existing queue.
  • Verify successful delegation using the same rule before and after the restart.
  • Dispose the controller handle when the test exits.

Fixes #60141.

karmegams02 and others added 3 commits July 31, 2026 11:34
-Recreate DelegationRule after receiver restart instead of using the stale/disposed rule to prevent HTTP 500 failures.
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Jul 31, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Thanks for your PR, @karmegams02. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

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.

Pull request overview

Stabilizes the DelegateAfterReceiverRestart HttpSys functional test by ensuring request delegation remains valid after the receiver server is restarted and re-attaches to the existing request queue.

Changes:

  • Recreates the DelegationRule after the receiver restart so delegation targets the reattached queue.
  • Removes the quarantine attribute from DelegateAfterReceiverRestart.

@karmegams02 karmegams02 changed the title Stabilize DelegateTests.DelegateAfterReceiverRestart Quarantine test [test-quarantine] Stabilize DelegateTests.DelegateAfterReceiverRestart Quarantine test Aug 5, 2026
@kotlarmilos

Copy link
Copy Markdown
Member

Tests passed in the CI, @halter73 PTAL

@Youssef1313 Youssef1313 added the area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions label Sep 2, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Looks like this PR hasn't been active for some time and the codebase could have been changed in the meantime.
To make sure no conflicting changes have occurred, please rerun validation before merging. You can do this by leaving an /azp run comment here (requires commit rights), or by simply closing and reopening.

@dotnet-policy-service dotnet-policy-service Bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Sep 26, 2026
@PureWeen

Copy link
Copy Markdown
Member

/review

@github-actions github-actions Bot 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.

Source-only review of frozen head e826c224ed68831efe32cbdecf8de4a1ecaa2fd8 found one new P3 test-coverage issue: recreating the delegation rule means the restart test no longer verifies that an existing rule remains usable after receiver reattachment.

Existing feedback coverage: inline comment 3711794631 correctly identified the overwritten-rule handle leak; this revision disposes that handle, but the replacement creates the distinct coverage gap noted inline. No unresolved candidates remain.

Guide completion: docs/CrossCuttingGuidance.md completed by its independent worker and coordinator validation. Test/CI execution and security assessment were excluded by the trusted source-only policy. No HttpSys-specific specialist guide was routed, so area-specific coverage remains uncovered.

Provenance: immutable guidance commit fe077f01b8e8b5e7161381ec331d7666326aafc9; frozen merge base 28dd8a5895819baed4d7211120dbff0b452cc368; tracked Git bytes only. Target code and tests were not executed; proof is source-only.

Generated by ASP.NET Core Pull Request Review for #68131 · copilot · gpt56 · 106.1 AIC · ⌖ 7.62 AIC · ⊞ 20.2K
Comment /review to run again

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.

🔵 Needs a closer look

Removing quarantine depends on Windows HTTP.sys lifetime and receiver-restart behavior that source review cannot validate without repeated DelegateAfterReceiverRestart passes on a delegation-capable Windows agent.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@karmegams02
karmegams02 requested a balanced review from Copilot November 3, 2026 11:45

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.

🔵 Needs a closer look

Windows HTTP.sys queue and handle stability across receiver restarts remains untested, and the missing frozen review bundle prevents verification of revision identities and independent checks.

No open issues 🎉

Review effort: Balanced

@kotlarmilos
kotlarmilos self-requested a review November 10, 2026 09:16
@kotlarmilos
kotlarmilos merged commit 50f5c66 into dotnet:main Nov 11, 2026
29 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

✅ No documentation PR was created.

Confidence that documentation is needed: 2%

No docs needed: the PR only stabilizes a quarantined HTTP.sys functional test.

Documentation surfaces considered

  • Conceptual article: Not required — Only src/Servers/HttpSys/test/FunctionalTests/DelegateTests.cs changed; test infrastructure.
  • Migration guidance: Not required — No user-facing change to adopt.
  • Breaking change: Not required — No API or behavior change; test only.

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — c92c8d55 Deployed Nov 11, 2026 by kotlarmilos via conclusion #294
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions community-contribution Indicates that the PR has been added by a community member feature-httpsys pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Quarantine Microsoft.AspNetCore.Server.HttpSys.FunctionalTests.DelegateTests.DelegateAfterReceiverRestart

6 participants