Skip to content

Add tests for multiple sync tokens scenarios#38538

Open
linglingye001 wants to merge 1 commit into
mainfrom
linglingye/multi-sync-tokens
Open

Add tests for multiple sync tokens scenarios#38538
linglingye001 wants to merge 1 commit into
mainfrom
linglingye/multi-sync-tokens

Conversation

@linglingye001
Copy link
Copy Markdown
Member

Packages impacted by this PR

Issues associated with this PR

Describe the problem that is addressed by this PR

What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?

Are there test cases added in this PR? (If not, why?)

Provide a list of related PRs (if any)

Command used to generate this PR:**(Applicable only to SDK release request PRs)

Checklists

  • Added impacted package name to the issue description
  • Does this PR needs any fixes in the SDK Generator?** (If so, create an Issue in the Autorest/typescript repository and link it here)
  • Added a changelog (if necessary)

Copilot AI review requested due to automatic review settings May 14, 2026 09:03
@github-actions github-actions Bot added the App Configuration Azure.ApplicationModel.Configuration label May 14, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for sync token response headers that contain whitespace after commas (which can occur when HTTP intermediaries join duplicate sync-token headers), and adds tests covering multi-token scenarios.

Changes:

  • Trim each comma-separated segment before parsing in SyncTokens.addSyncTokenFromHeaderValue so values like "a=v;sn=1, b=v;sn=2" parse correctly.
  • Add unit tests for multiple sync tokens in a single header and for tokens with spaces after commas.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
sdk/appconfiguration/app-configuration/src/internal/syncTokenPolicy.ts Trim each token segment after splitting on , before parsing.
sdk/appconfiguration/app-configuration/test/internal/node/http.spec.ts New tests for multi-token responses and space-after-comma joined headers.

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

Labels

App Configuration Azure.ApplicationModel.Configuration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants