Skip to content

[release/11.0] Fix Cosmos concurrency tests by normalizing ETag comparisons - #39215

Open
AndriySvyryd with Copilot wants to merge 3 commits into
release/11.0from
copilot/normalize-cosmos-concurrency-asserts
Open

AndriySvyryd with Copilot wants to merge 3 commits into
release/11.0from
copilot/normalize-cosmos-concurrency-asserts

Conversation

Copilot AI commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Cosmos concurrency tests can receive ETags in quoted or unquoted formats depending on emulator version, causing equivalent values to fail string comparisons.

  • Normalization
    • Trim surrounding quotes from both operands in all ETag equality and inequality assertions.
    • Preserve Assert.NotEmpty checks against the original ETag values.
Assert.Equal(etag.Trim('"'), customerFromStore.ETag.Trim('"'));

Copilot AI and others added 3 commits October 9, 2026 19:36
Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>

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.

🟢 Approval recommended

No unresolved review issues remain.

0 open findings

What changed in this PR

Normalizes Cosmos ETag comparisons so quoted and unquoted equivalent values compare consistently.

Changes:

  • Trims surrounding quotes in ETag equality and inequality assertions.
  • Preserves original ETag values for Assert.NotEmpty checks.
File Description
test/​EFCore.Cosmos.FunctionalTests/​CosmosConcurrencyTest.cs Normalizes ETag comparisons in concurrency tests.

🧠 Review effort: Lite


💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@github-code-quality

Copy link
Copy Markdown

Code Coverage Overview

Languages: C#

C# / code-coverage

The overall line coverage in commit 4b608fc in the copilot/normalize-co... branch is 67%. The line coverage in commit 2229eb5 in the release/11.0 branch is 76%.

Show a line coverage summary of the most impacted files.
File release/11.0 2229eb5 copilot/normalize-co... 4b608fc +/-
/Users/runner/w...nal/Snapshot.cs 0% 60% +60%
D:\a\efcore\efc...nal\Snapshot.cs 0% 64% +64%
/home/runner/wo...nal/Snapshot.cs 0% 66% +66%
/home/runner/wo...yTypeBuilder.cs 0% 88% +88%
D:\a\efcore\efc...yTypeBuilder.cs 0% 88% +88%
/Users/runner/w...ngs.Designer.cs 0% 92% +92%
/home/runner/wo...ctExpression.cs 0% 93% +93%
D:\a\efcore\efc...ctExpression.cs 0% 93% +93%
D:\a\efcore\efc...ngs.Designer.cs 0% 94% +94%
/home/runner/wo...ngs.Designer.cs 0% 95% +95%

@AndriySvyryd AndriySvyryd changed the title Normalize Cosmos concurrency ETag comparisons [release/11.0] Fix Cosmos concurrency tests by normalizin ETag comparisons Oct 9, 2026
@AndriySvyryd AndriySvyryd changed the title [release/11.0] Fix Cosmos concurrency tests by normalizin ETag comparisons [release/11.0] Fix Cosmos concurrency tests by normalizing ETag comparisons Oct 9, 2026
@AndriySvyryd
AndriySvyryd requested a review from wtgodbe October 9, 2026 20:43
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.

3 participants