Skip to content

Stabilize DelegateTests.DelegateAfterReceiverRestart Quarantine test - #68131

Open
karmegams02 wants to merge 6 commits into
dotnet:mainfrom
karmegams02:60141_testfailure
Open

Stabilize DelegateTests.DelegateAfterReceiverRestart Quarantine test#68131
karmegams02 wants to merge 6 commits into
dotnet:mainfrom
karmegams02:60141_testfailure

Conversation

@karmegams02

Copy link
Copy Markdown

Stabilize DelegateTests.DelegateAfterReceiverRestart

Description

This PR addresses failures in
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests.DelegateTests.DelegateAfterReceiverRestart.

The test could fail after the receiver server was restarted because request delegation continued using a previously created DelegationRule that was no longer valid. This resulted in delegated requests returning HTTP 500 responses instead of reaching the restarted receiver.

To ensure delegation remains functional after a receiver restart, the test now recreates the DelegationRule once the receiver has been restarted and reattached to the request queue.

Validation / Investigation

  1. The failure was analyzed and determined to occur after the receiver server restart scenario.
  2. The original DelegationRule instance was tied to the previous receiver attachment and became invalid once the receiver was stopped.
  3. After the receiver restarted and reattached to the queue, delegation continued using the stale rule rather than creating a new valid delegation target.
  4. Recreating the DelegationRule after queue reattachment restores proper request delegation and allows the test to complete successfully.

Changes

  1. Recreated the DelegationRule after the receiver restart.
  2. Ensured delegation uses the newly attached receiver queue instead of the disposed rule.
  3. Preserved the existing test flow while validating successful delegation after receiver recovery.

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.

Comment thread src/Servers/HttpSys/test/FunctionalTests/DelegateTests.cs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants