Skip to content

Stabilize @defer overlap HTTP tests with instant initial fields#9905

Merged
glen-84 merged 1 commit into
mainfrom
gai/defer-overlap-instant-initial-fields
Jun 12, 2026
Merged

Stabilize @defer overlap HTTP tests with instant initial fields#9905
glen-84 merged 1 commit into
mainfrom
gai/defer-overlap-instant-initial-fields

Conversation

@glen-84

@glen-84 glen-84 commented Jun 12, 2026

Copy link
Copy Markdown
Member

Summary

  • DeferOverHttpTests.Defer_Overlap_*_Legacy_Format flaked because the initial selection included description, whose 1000 ms resolver delay raced the deferred fragment's payload — the engine non-deterministically bundled the initial and deferred @defer payloads into one instead of two. The xUnit 3 / Microsoft Testing Platform migration shifted scheduling and exposed this pre-existing race.
  • Aligned the overlap tests with the pattern used by every other (non-flaky) defer test: the initial selection now contains only the instant name field, while the slow description field stays inside the @defer fragment. The initial payload flushes immediately and the deferred payload reliably lags, so delivery is deterministically two parts.
  • No resolver delays were changed. Only the initial-payload snapshots were updated (they drop description); the merged incremental payloads are unchanged, so the legacy merge/dedup behavior is still covered via the name overlap.

Test plan

  • Ran the three overlap tests 20× in a loop: green every iteration.
  • Ran the full DeferOverHttpTests class (63 tests): all pass.

Copilot AI review requested due to automatic review settings June 12, 2026 09:19

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

This PR stabilizes the legacy-format @defer overlap HTTP tests by ensuring the initial payload contains only fields that resolve immediately, avoiding nondeterministic bundling of initial and deferred payloads.

Changes:

  • Updated the overlap test queries so the initial selection only requests product { name }, keeping the slow description field inside the deferred fragment.
  • Updated legacy-format response expectations/snapshots so the initial payload no longer includes description while the deferred incremental payload remains unchanged.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants