Skip to content

Update tests for Azure SQL - #39360

Open
AndriySvyryd wants to merge 1 commit into
mainfrom
AzureTests
Open

AndriySvyryd wants to merge 1 commit into
mainfrom
AzureTests

Conversation

@AndriySvyryd

Copy link
Copy Markdown
Member

No description provided.

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.

🟡 Changes recommended

Empty supported elastic pools are incorrectly cached as unsupported, silently skipping memory-optimized tests.

1 open issue
What changed in this PR

Updates EF Core’s SQL Server functional tests to account for Azure SQL configuration and JSON behavior.

Changes:

  • Adjusts JSON query, update, and migration expectations for Azure SQL.
  • Preserves provider configuration when customizing test options.
  • Updates capability detection and elastic-pool test conditions.
File Description
test/​EFCore.SqlServer.FunctionalTests/​Update/​JsonUpdateSqlServerTest.cs Adds Azure-specific parameter baselines.
test/​EFCore.SqlServer.FunctionalTests/​Update/​JsonUpdateJsonTypeSqlServerTest.cs Adjusts Azure parameter-size expectations.
test/​EFCore.SqlServer.FunctionalTests/​Types/​SqlServerTypeFixture.cs Uses JSON capability detection.
test/​EFCore.SqlServer.FunctionalTests/​Types/​SqlServerSpatialTypeTestBase.cs Preserves provider selection when configuring spatial support.
test/​EFCore.SqlServer.FunctionalTests/​TransactionSqlServerTest.cs Selects Azure SQL configuration when appropriate.
test/​EFCore.SqlServer.FunctionalTests/​TestUtilities/​SqlServerTestEnvironment.cs Updates capability and compatibility detection.
test/​EFCore.SqlServer.FunctionalTests/​SqlServerValueGenerationConflictTest.cs Configures contexts for the selected provider.
test/​EFCore.SqlServer.FunctionalTests/​SqlAzure/​SqlAzureDatabaseCreationTest.cs Gates pool tests and corrects tier configuration.
test/​EFCore.SqlServer.FunctionalTests/​Query/​JsonQueryJsonTypeSqlServerTest.cs Corrects JSON query baselines.
test/​EFCore.SqlServer.FunctionalTests/​Query/​Inheritance/​TPTInheritanceJsonQuerySqlServerTest.cs Adds Azure-specific inheritance query expectations.
test/​EFCore.SqlServer.FunctionalTests/​Query/​Inheritance/​TPHInheritanceJsonQuerySqlServerTest.cs Adds Azure-specific inheritance query expectations.
test/​EFCore.SqlServer.FunctionalTests/​Query/​Inheritance/​TPCInheritanceJsonQuerySqlServerTest.cs Adds Azure-specific inheritance query expectations.
test/​EFCore.SqlServer.FunctionalTests/​Query/​ComplexTypeQuerySqlServerTest.cs Explicitly maps string lists to text columns.
test/​EFCore.SqlServer.FunctionalTests/​Query/​Associations/​OwnedJson/​OwnedJsonSqlServerFixture.cs Recognizes Azure JSON support.
test/​EFCore.SqlServer.FunctionalTests/​Query/​Associations/​OwnedJson/​OwnedJsonProjectionSqlServerTest.cs Selects Azure-compatible projection baselines.
test/​EFCore.SqlServer.FunctionalTests/​Query/​Associations/​OwnedJson/​OwnedJsonCollectionSqlServerTest.cs Adjusts Azure collection expectations.
test/​EFCore.SqlServer.FunctionalTests/​Query/​Associations/​ComplexJson/​ComplexJsonStructuralEqualitySqlServerTest.cs Adjusts nested JSON column types in baselines.
test/​EFCore.SqlServer.FunctionalTests/​Query/​Associations/​ComplexJson/​ComplexJsonSqlServerFixture.cs Recognizes Azure JSON support.
test/​EFCore.SqlServer.FunctionalTests/​Query/​Associations/​ComplexJson/​ComplexJsonSetOperationsSqlServerTest.cs Selects Azure-compatible aggregate expectations.
test/​EFCore.SqlServer.FunctionalTests/​Query/​Associations/​ComplexJson/​ComplexJsonProjectionSqlServerTest.cs Selects Azure-compatible projection baselines.
test/​EFCore.SqlServer.FunctionalTests/​Query/​Associations/​ComplexJson/​ComplexJsonCollectionSqlServerTest.cs Adjusts Azure collection expectations.
test/​EFCore.SqlServer.FunctionalTests/​Migrations/​MigrationsSqlServerTest.cs Expects Azure’s native JSON column type.
test/​EFCore.SqlServer.FunctionalTests/​KeysWithConvertersSqlServerTest.cs Preserves provider selection when configuring batching.
test/​EFCore.Relational.Specification.Tests/​Migrations/​MigrationsTestBase.cs Preserves string storage types in conversion tests.

Review effort: Balanced

Comment thread test/EFCore.SqlServer.FunctionalTests/TestUtilities/SqlServerTestEnvironment.cs Outdated
@github-code-quality

github-code-quality Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Code coverage overview

Languages: C#

C# / code-coverage

main 4317e84 AzureTests 5a9d33e +/-
76% 76% 0%
View coverage of the 10 most impacted files.
File main 4317e84 AzureTests 5a9d33e +/-
src/EFCore.Anal...icSuppressor.cs 96% 96% 0%
src/EFCore.Cosm...erExtensions.cs 100% 100% 0%
src/EFCore.Cosm...nsExtensions.cs 82% 82% 0%
src/EFCore.Cosm...erExtensions.cs 46% 46% 0%
src/EFCore.Cosm...peExtensions.cs 73% 73% 0%
src/EFCore.Cosm...erExtensions.cs 87% 87% 0%
src/EFCore.Cosm...delValidator.cs 98% 98% 0%
src/EFCore.Cosm...exingBuilder.cs 96% 96% 0%
src/EFCore.Rela...osticsLogger.cs 98% 99% +1%
src/Microsoft.D...nnectionPool.cs 97% 100% +3%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated October 22, 2026 01:42 UTC

@AndriySvyryd
AndriySvyryd marked this pull request as ready for review October 21, 2026 22:28
@AndriySvyryd
AndriySvyryd requested a review from a team as a code owner October 21, 2026 22:28
Copilot AI balanced review requested due to automatic review settings October 21, 2026 22:28

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.

🟡 Changes recommended

Azure probe cleanup misclassifies successful capability checks, and three revised JSON baselines still lack matching provider-generation changes.

2 open issues
1 resolved since last review

Review effort: Balanced

Comment on lines +245 to +246
await using var testStore = SqlServerTestStore.Create(
$"MemoryOptimizedTablesProbe_{Guid.NewGuid():N}");
Copilot AI balanced review requested due to automatic review settings October 22, 2026 01:16

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.

🟡 Changes recommended

Azure database cleanup still violates batch restrictions, and revised JSON baselines require corresponding provider translation fixes.

3 open issues
1 resolved since last review

Review effort: Balanced

SELECT [o0].[c]
FROM (
SELECT JSON_VALUE([o].[OwnedReferenceLeaf], '$.SomethingSomething' RETURNING nvarchar(max)) AS [c], [o].[Date]
SELECT JSON_VALUE([o].[OwnedReferenceLeaf], '$.SomethingSomething') AS [c], [o].[Date]
Comment on lines +251 to +254
IF SERVERPROPERTY('EngineEdition') <> 5
BEGIN
ALTER DATABASE [{0}] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
END;
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