Skip to content

Update Cosmos tests to handle unsupported scenarios with inconclusive assertions#26

Merged
koenbeuk merged 10 commits intomainfrom
fix/cosmos-tests
Apr 11, 2026
Merged

Update Cosmos tests to handle unsupported scenarios with inconclusive assertions#26
koenbeuk merged 10 commits intomainfrom
fix/cosmos-tests

Conversation

@koenbeuk
Copy link
Copy Markdown
Collaborator

@koenbeuk koenbeuk commented Apr 9, 2026

Added [TestInitialize] to the SeedStoreData() override — the critical fix
Added 16 Inconclusive overrides for genuine EF Core Cosmos provider limitations:
4 for implicit numeric type conversions (Expression.Convert int→double)
5 for LINQ subqueries on owned collections (loop→LINQ expansion)
3 for ORDER BY on computed expressions
2 for int.ToString() in Where clauses
1 for owned entity projection without owner
1 for null equality semantics on owned types
Added 3 net10.0-only overrides for EF Core 10 Cosmos provider dropping null rows in null-conditional projections

Copilot AI review requested due to automatic review settings April 9, 2026 02:25
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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

Updates the EF Core Cosmos integration test suite to avoid false negatives by ensuring Cosmos-specific seeding runs and by marking provider-unsupported scenarios as inconclusive rather than failing.

Changes:

  • Ensures Cosmos uses the correct per-test data seeding via [TestInitialize] on the Cosmos override.
  • Adds Cosmos-specific overrides that Assert.Inconclusive for known EF Core Cosmos translation/provider limitations (with additional net10-specific cases).
  • Makes selected scenario tests in CommonScenarioTestBase virtual so provider-specific test projects can override them cleanly.

Reviewed changes

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

File Description
tests/ExpressiveSharp.EntityFrameworkCore.IntegrationTests/Tests/Cosmos/CommonScenarioTests.cs Adds Cosmos [TestInitialize] seeding override and new inconclusive overrides for unsupported Cosmos scenarios (plus net10-only overrides).
tests/ExpressiveSharp.EntityFrameworkCore.IntegrationTests/Infrastructure/CommonScenarioTestBase.cs Marks specific [TestMethod]s as virtual to allow Cosmos to override unsupported scenarios.

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

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'ExpressiveSharp Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.50.

Benchmark suite Current: 05a5166 Previous: 011c931 Ratio
ExpressiveSharp.Benchmarks.ExpressionResolverBenchmarks.ResolveViaReflection_Property 13.896437371415752 ns (± 5.669499198189406) 8.460694320499897 ns (± 0.018608417467457363) 1.64
ExpressiveSharp.Benchmarks.GeneratorBenchmarks.RunGenerator_Incremental_NoiseChange(ExpressiveCount: 1) 54359.45069298377 ns (± 274.56990162370255) 36048.59856262207 ns (± 244.80327187768194) 1.51

This comment was automatically generated by workflow using github-action-benchmark.

@koenbeuk koenbeuk merged commit 45dc35a into main Apr 11, 2026
16 checks passed
@koenbeuk koenbeuk deleted the fix/cosmos-tests branch April 11, 2026 01:21
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.

2 participants