Skip to content

Sync to EF 11.0.0-preview.5.26279.113#3853

Open
roji wants to merge 1 commit into
npgsql:mainfrom
roji:roji/sync-to-latest-ef
Open

Sync to EF 11.0.0-preview.5.26279.113#3853
roji wants to merge 1 commit into
npgsql:mainfrom
roji:roji/sync-to-latest-ef

Conversation

@roji
Copy link
Copy Markdown
Member

@roji roji commented Jun 1, 2026

Syncs EFCore.PG to the latest EF Core daily build on the preview.5 line: 11.0.0-preview.5.26275.101 → 11.0.0-preview.5.26279.113.

What changed

The main fallout is that EF Core's test infrastructure was reverted from xunit v3 back to xunit v2 on the preview.5 line. The Microsoft.EntityFrameworkCore.Specification.Tests package dependencies changed accordingly:

26275.101 26279.113
xunit xunit.v3.assert / xunit.v3.extensibility.core 4.0.0-pre.108 xunit.assert / xunit.core 2.9.3
extensions Microsoft.DotNet.XUnitV3Extensions xunit.runner.visualstudio 4.0.0-pre.4

This required reverting the xunit-v3 / Microsoft.Testing.Platform migration that was introduced in the previous sync (commit 3ddc83c, "Sync to EF 11.0.0-preview.5.26275.101"), while preserving the genuine EF API/test fallout from that commit. Concretely:

  • Framework config reverted to xunit v2: removed the xunit.v3 package, the MTP runner wiring in test/Directory.Build.props (UseMicrosoftTestingPlatformRunner, OutputType=Exe, TestRunnerName=XUnitV3, TestingPlatformCommandLineArguments), the Microsoft.Testing.Platform runner in global.json, the dotnet-eng package-source mapping in NuGet.config, and restored the classic dotnet test invocation in build.yml.
  • Test code reverted from xunit v3 idioms back to v2: [ActiveIssue(...)][ConditionalFact/Theory(Skip = ...)], [SkipOnPlatform(TestPlatforms.X, ...)][PlatformSkipCondition(...)], IAsyncLifetime overrides ValueTaskTask, and the RequiresPostgis / MinimumPostgresVersion attributes back to ITestCondition.
  • Test baselines adjusted to match the target build: MathTranslationsNpgsqlTest.Sign/Sign_float now assert a single query, and TPCInheritanceQueryNpgsqlTest.Can_insert_update_delete again asserts the PG seed/sequence conflict.

EF-side changes

EF Core's product source is essentially unchanged between these two daily builds — the relevant change is the test-infrastructure downgrade from xunit v3 to xunit v2 on the release/11.0-preview5 line (main remains on xunit v3 via dotnet/efcore#38277). The change flows through the dotnet/dotnet VMR, so there is no single dotnet/efcore product PR to attribute it to.

Validation

  • Full solution builds clean (Release, 0 warnings/errors).
  • Unit tests: 491 passed, 6 skipped, 0 failed.
  • Functional tests against PostgreSQL: 27830 passed, 274 skipped, 0 failed.

EF Core reverted its test infrastructure from xunit v3 back to xunit v2
on the preview.5 line, so this reverts the xunit-v3/MTP migration that was
introduced in the previous sync (3ddc83c), while keeping the genuine EF
API/test-baseline fallout for the new build.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 1, 2026 10:24
Copy link
Copy Markdown

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

Syncs EFCore.PG to EF Core 11.0.0-preview.5.26279.113, with the primary impact being the EF test infrastructure downgrade from xUnit v3 back to xUnit v2, and the corresponding adjustments across the test suite and CI.

Changes:

  • Bumps EF Core / Microsoft.Extensions daily-build versions in Directory.Packages.props.
  • Reverts test infrastructure from xUnit v3/Microsoft.Testing.Platform back to xUnit v2 (packages, global.json runner config, CI invocation, and test attributes/fixtures).
  • Updates/realigns several functional-test baselines and behaviors to match the new EF build (e.g. Math Sign* baseline, TPC insert/update/delete behavior).
Show a summary per file
File Description
test/EFCore.PG.FunctionalTests/ValueConvertersEndToEndNpgsqlTest.cs Replaces xUnit v3 ActiveIssue usage with xUnit v2 conditional skip attribute.
test/EFCore.PG.FunctionalTests/Update/JsonUpdateNpgsqlTest.cs Adds ConditionalFact annotations for xUnit v2 conditional execution.
test/EFCore.PG.FunctionalTests/TestUtilities/RequiresPostgisAttribute.cs Reworks PostGIS requirement attribute to xUnit v2 ITestCondition model.
test/EFCore.PG.FunctionalTests/TestUtilities/MinimumPostgresVersionAttribute.cs Reworks min-Postgres-version attribute to xUnit v2 ITestCondition model.
test/EFCore.PG.FunctionalTests/SequenceEndToEndTest.cs Converts fixture lifetime methods from ValueTask to Task for xUnit v2.
test/EFCore.PG.FunctionalTests/Scaffolding/NpgsqlDatabaseModelFactoryTest.cs Converts fixture initialization override to Task for xUnit v2.
test/EFCore.PG.FunctionalTests/Query/UdfDbFunctionNpgsqlTests.cs Replaces ActiveIssue with xUnit v2 conditional skip attribute.
test/EFCore.PG.FunctionalTests/Query/Translations/MathTranslationsNpgsqlTest.cs Updates expected SQL baselines (removes extra query assertions).
test/EFCore.PG.FunctionalTests/Query/Translations/ByteArrayTranslationsNpgsqlTest.cs Adds ConditionalFact to align with xUnit v2 conditional execution.
test/EFCore.PG.FunctionalTests/Query/SqlQueryNpgsqlTest.cs Replaces ActiveIssue with xUnit v2 conditional skip attributes.
test/EFCore.PG.FunctionalTests/Query/PrimitiveCollectionsQueryNpgsqlTest.cs Adds ConditionalFact for conditional execution under xUnit v2.
test/EFCore.PG.FunctionalTests/Query/NorthwindGroupByQueryNpgsqlTest.cs Replaces ActiveIssue with xUnit v2 conditional skip attribute.
test/EFCore.PG.FunctionalTests/Query/NorthwindDbFunctionsQueryNpgsqlTest.cs Replaces platform skip attribute with xUnit v2 platform skip condition.
test/EFCore.PG.FunctionalTests/Query/LegacyTimestampQueryTest.cs Converts async dispose from ValueTask to Task for xUnit v2.
test/EFCore.PG.FunctionalTests/Query/Inheritance/TPCInheritanceQueryNpgsqlTest.cs Updates insert/update/delete test behavior to expect a conflict again (per EF baseline).
test/EFCore.PG.FunctionalTests/Query/FromSqlQueryNpgsqlTest.cs Replaces ActiveIssue and adds xUnit v2 conditional theory annotation.
test/EFCore.PG.FunctionalTests/Query/EntitySplittingQueryNpgsqlTest.cs Replaces ActiveIssue with xUnit v2 conditional skip attributes.
test/EFCore.PG.FunctionalTests/Query/ComplexNavigationsSharedTypeQueryNpgsqlTest.cs Replaces ActiveIssue with xUnit v2 conditional skip attributes.
test/EFCore.PG.FunctionalTests/Query/CompatibilityQueryNpgsqlTest.cs Converts fixture lifetime methods from ValueTask to Task for xUnit v2.
test/EFCore.PG.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsCollectionNpgsqlTest.cs Adds ConditionalFact for xUnit v2 conditional execution.
test/EFCore.PG.FunctionalTests/Query/Associations/OwnedJson/OwnedJsonCollectionNpgsqlTest.cs Adds ConditionalFact for xUnit v2 conditional execution.
test/EFCore.PG.FunctionalTests/Query/Associations/Navigations/NavigationsCollectionNpgsqlTest.cs Adds ConditionalFact for xUnit v2 conditional execution.
test/EFCore.PG.FunctionalTests/Query/Associations/ComplexJson/ComplexJsonCollectionNpgsqlTest.cs Adds ConditionalFact for xUnit v2 conditional execution.
test/EFCore.PG.FunctionalTests/Query/AdHocMiscellaneousQueryNpgsqlTest.cs Replaces ActiveIssue with xUnit v2 conditional skip attribute.
test/EFCore.PG.FunctionalTests/Migrations/MigrationsNpgsqlTest.cs Replaces ActiveIssue with xUnit v2 conditional skip attribute.
test/EFCore.PG.FunctionalTests/Migrations/MigrationsInfrastructureNpgsqlTest.cs Replaces ActiveIssue with xUnit v2 conditional skip attributes.
test/EFCore.PG.FunctionalTests/LazyLoadProxyNpgsqlTest.cs Adjusts conditional execution/skip annotations for xUnit v2.
test/EFCore.PG.FunctionalTests/JsonTypesNpgsqlTest.cs Adds ConditionalFact annotations for xUnit v2 conditional execution.
test/EFCore.PG.FunctionalTests/CustomConvertersNpgsqlTest.cs Replaces ActiveIssue with xUnit v2 conditional skip attribute.
test/EFCore.PG.FunctionalTests/ConvertToProviderTypesNpgsqlTest.cs Replaces ActiveIssue with xUnit v2 conditional skip attribute.
test/EFCore.PG.FunctionalTests/ConnectionInterceptionNpgsqlTest.cs Replaces ActiveIssue with xUnit v2 conditional skip attributes.
test/EFCore.PG.FunctionalTests/ComputedColumnTest.cs Converts fixture lifetime methods from ValueTask to Task for xUnit v2.
test/EFCore.PG.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesNpgsqlTest.cs Adds ConditionalTheory annotations for xUnit v2 conditional execution.
test/Directory.Build.props Switches test dependencies/usings back to xUnit v2 and removes MTP runner properties.
NuGet.config Removes dotnet-eng package source mapping used for the prior MTP/xUnit v3 setup.
global.json Removes Microsoft.Testing.Platform runner configuration.
Directory.Packages.props Updates EF Core / Extensions package versions; removes xUnit v3 package version entry.
.github/workflows/build.yml Restores classic dotnet test usage with GitHubActionsTestLogger.

Copilot's findings

  • Files reviewed: 39/39 changed files
  • Comments generated: 2

Comment on lines +81 to +83
// Seed data for the fixture manually inserts entities with IDs 1, 2; then this test attempts to insert another one with an auto-generated ID,
// but the PG sequence wasn't updated so produces 1, resulting in a conflict. The test should be consistent in either using either
// auto-generated IDs or not across the board.
Comment on lines 84 to +85
public override Task Can_insert_update_delete()
=> base.Can_insert_update_delete();
=> Assert.ThrowsAsync<DbUpdateException>(base.Can_insert_update_delete);
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