Skip to content

Enable Npgsql.Specification.Tests in the build pipeline#6504

Merged
roji merged 4 commits intonpgsql:mainfrom
brianpursley:specification-tests
Mar 19, 2026
Merged

Enable Npgsql.Specification.Tests in the build pipeline#6504
roji merged 4 commits intonpgsql:mainfrom
brianpursley:specification-tests

Conversation

@brianpursley
Copy link
Copy Markdown
Contributor

This enables Npgsql.Specification.Tests in the GitHub Actions build.

Today the specification test project exists in the repository but is not exercised by CI, which means provider/spec alignment is not visible in the normal test signal. This change brings that coverage into CI and makes the current state explicit.

Several tests are currently overridden and skipped with per-test reasons because Npgsql behavior differs from what AdoNet.Specification.Tests expects. These skips are intended to document the current state, not to declare that the current behavior is necessarily correct. Some of these differences may be by design, while others may represent compatibility gaps worth investigating separately.

What this PR does:

  • Adds test/Npgsql.Specification.Tests to the GitHub Actions test step
  • Marks currently known failing specification tests as skipped with explanations
  • Leaves runtime behavior unchanged

Current local result after this change:

  • 217 total
  • 197 passing
  • 20 skipped

I think this provides a better baseline:

  • improvements in specification alignment will become visible
  • regressions in currently passing specification tests will fail CI
  • the remaining divergences are documented and can be discussed individually as either by-design or fix candidates

Skip specification tests where Npgsql's behavior is different than what the ADO.NET Specification Tests expect.
Copilot AI review requested due to automatic review settings March 13, 2026 20:04
@brianpursley
Copy link
Copy Markdown
Contributor Author

This is just an idea I had. Interested in your thoughts on this...

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

Enables the Npgsql.Specification.Tests project to run in GitHub Actions CI, making ADO.NET specification alignment (and current divergences) part of the normal test signal without changing runtime behavior.

Changes:

  • Run test/Npgsql.Specification.Tests as part of the CI test step.
  • Override known failing spec tests and mark them as skipped with per-test reasons.
  • Add xUnit analyzer suppression to allow intentional skips without failing the build.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
test/Npgsql.Specification.Tests/NpgsqlDataReaderTests.cs Adds skipped overrides for known DbDataReader spec divergences (exceptions/cancellation behavior).
test/Npgsql.Specification.Tests/NpgsqlConnectionTests.cs Adds skipped overrides for connection disposal/event/cancellation divergences.
test/Npgsql.Specification.Tests/NpgsqlCommandTests.cs Adds skipped overrides for command/transaction/parameter behavior divergences.
.github/workflows/build.yml Runs dotnet test for the specification test project in CI.

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

Copy link
Copy Markdown
Member

@roji roji left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, please take a look at the comments.

@NinoFloris NinoFloris linked an issue Mar 14, 2026 that may be closed by this pull request
… class

* Assert expected base test failure when Npgsql behavior intentionally differs from the behavior tested by AdoNet.Specification.Tests
* Combine all tests into a single dotnet test execuction in build.yml
Copilot AI review requested due to automatic review settings March 15, 2026 20:22
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

This PR wires Npgsql.Specification.Tests into the CI signal by switching the GitHub Actions test step to run the full solution test set, and by explicitly documenting current ADO.NET specification divergences via skipped/overridden tests.

Changes:

  • Run dotnet test at the solution level in GitHub Actions (including Npgsql.Specification.Tests), with a prerelease path filtering out plugin tests.
  • Add explicit per-test skips in Npgsql.Specification.Tests to capture known divergences from AdoNet.Specification.Tests.
  • Suppress xUnit analyzer warning xUnit1004 for intentionally skipped spec tests.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test/Npgsql.Specification.Tests/NpgsqlDataReaderTests.cs Overrides and skips known-divergent DataReader spec tests with reasons.
test/Npgsql.Specification.Tests/NpgsqlConnectionTests.cs Overrides and skips known-divergent Connection spec tests with reasons.
test/Npgsql.Specification.Tests/NpgsqlCommandTests.cs Makes transaction-related divergences explicit and skips a couple additional divergent command tests.
test/Npgsql.Specification.Tests/Npgsql.Specification.Tests.csproj Suppresses xUnit1004 to keep CI green with intentional skips.
.github/workflows/build.yml Runs full-solution tests in CI and ensures the npgsql_tests database exists across OSes.

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

@NinoFloris NinoFloris requested a review from roji March 17, 2026 07:39
Copy link
Copy Markdown
Member

@NinoFloris NinoFloris left a comment

Choose a reason for hiding this comment

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

LGTM, waiting for @roji to re-review. Thanks @brianpursley.

Copy link
Copy Markdown
Member

@roji roji left a comment

Choose a reason for hiding this comment

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

Thanks, looks great!

@roji roji merged commit ba83963 into npgsql:main Mar 19, 2026
12 checks passed
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.

Enable ADO.NET spec tests in CI

4 participants