Skip to content

Add reproduction test for RetryLink AbortError with subscriptions#13126

Draft
Copilot wants to merge 6 commits into
mainfrom
copilot/reproduce-aborterror-bodystreambuffer
Draft

Add reproduction test for RetryLink AbortError with subscriptions#13126
Copilot wants to merge 6 commits into
mainfrom
copilot/reproduce-aborterror-bodystreambuffer

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 4, 2026

Reproduction for AbortError: BodyStreamBuffer issue

Minimal reproduction test for #13125 (comment)

Issue

When RetryLink retries a subscription using AbortController, aborting the first attempt's controller triggers AbortError: BodyStreamBuffer was aborted which can interfere with the retry mechanism.

Test Added

Single test in src/link/retry/__tests__/retryLink.ts that:

  • Uses HttpLink with mockMultipartSubscriptionStream for realistic multipart subscription behavior
  • First attempt fails with protocol error (triggers retry and AbortController cleanup)
  • Second attempt succeeds
  • Verifies subscription completes successfully despite AbortController cleanup

The test documents the scenario and serves as a regression test.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@apollo-cla
Copy link
Copy Markdown

@Copilot: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 4, 2026

⚠️ No Changeset found

Latest commit: e0fb81d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copilot AI and others added 3 commits February 4, 2026 14:32
…tryLink and subscriptions

Co-authored-by: phryneas <4282439+phryneas@users.noreply.github.com>
Co-authored-by: phryneas <4282439+phryneas@users.noreply.github.com>
Co-authored-by: phryneas <4282439+phryneas@users.noreply.github.com>
Copilot AI changed the title [WIP] Open PR to reproduce AbortError: BodyStreamBuffer issue Add reproduction tests for RetryLink AbortError interference with subscriptions Feb 4, 2026
Copilot AI requested a review from phryneas February 4, 2026 14:36
@phryneas
Copy link
Copy Markdown
Member

phryneas commented Feb 4, 2026

@copilot that's a lot, can this be condensed down?

Co-authored-by: phryneas <4282439+phryneas@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 4, 2026

@copilot that's a lot, can this be condensed down?

Condensed to a single 40-line test in 415f9e9. Removed the extra test file and documentation.

Copilot AI changed the title Add reproduction tests for RetryLink AbortError interference with subscriptions Add reproduction test for RetryLink AbortError with subscriptions Feb 4, 2026
@phryneas
Copy link
Copy Markdown
Member

phryneas commented Feb 4, 2026

@copilot keep it more realistic with a HttpLink and a mockMultipartSubscriptionStream

Co-authored-by: phryneas <4282439+phryneas@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 4, 2026

@copilot keep it more realistic with a HttpLink and a mockMultipartSubscriptionStream

Updated to use HttpLink with mockMultipartSubscriptionStream in e0fb81d. The test now demonstrates the realistic scenario with multipart subscription infrastructure and AbortController.

@jameswu1991
Copy link
Copy Markdown

related #13161

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.

4 participants