Skip to content

SqlServer: make the Azure SQL tests conditional - #96

Merged
adamsitnik merged 2 commits into
CommunityToolkit:mainfrom
Laurianti:sqlserver-conditional-azure-tests
Nov 20, 2026
Merged

adamsitnik merged 2 commits into
CommunityToolkit:mainfrom
Laurianti:sqlserver-conditional-azure-tests

Conversation

@Laurianti

Copy link
Copy Markdown
Member

The DiskANN test and the hybrid search tests need Azure SQL. Outside Azure SQL they are now skipped.

Changes

  • SqlServerIndexKindTests.DiskAnn used to return early and count as passed. It is now skipped.
  • SqlServerHybridSearchTests.cs is compiled again. Each test is skipped outside Azure SQL, and the fixtures do not create their collections there, because xUnit reports a skip thrown from a class fixture as a failure.
  • SqlServerTestSuiteImplementationTests no longer ignores HybridSearchTests<>.

Tests

Target net10.0 net472
Testcontainer (SQL Server 2025) 233 passed, 8 skipped 231 passed, 8 skipped
SQL Server 2025 through a connection string 233 passed, 8 skipped 231 passed, 8 skipped
Azure SQL Database 241 passed 239 passed

The 8 skipped tests are DiskAnn and the 7 hybrid search tests. On Azure SQL the same 8 ran and passed.

On Azure SQL I ran the two target frameworks one at a time. Run together against the same database, they use the same tables and fail.

Fixes #20

Skip the DiskANN test and the hybrid search tests outside Azure SQL. The hybrid search tests are compiled again.

Fixes CommunityToolkit#20
@Laurianti
Laurianti requested a review from adamsitnik November 19, 2026 22:42

@adamsitnik adamsitnik 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.

Overall it LGTM, but I have one idea how we could simplify SqlServerHybridSearchTests, PTAL at my comment.

@Laurianti thank you for fixing this!

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 active review issues remain for the Azure SQL conformance-test changes.

No open issues 🎉

What changed in this PR

Makes Azure SQL–dependent SQL Server conformance tests conditional, addressing #20 without disabling hybrid search coverage.

Changes:

  • Reports DiskANN as skipped outside Azure SQL instead of silently passing.
  • Re-enables hybrid search tests, skipping them and avoiding fixture collection setup on unsupported targets.
  • Restores hybrid search to the test-suite implementation checks.
File Description
MEVD/​test/​SqlServer.ConformanceTests/​Support/​AzureSqlRequiredAttribute.cs Adds a shared skip helper and recognizes the local testcontainer as non-Azure SQL.
MEVD/​test/​SqlServer.ConformanceTests/​SqlServerTestSuiteImplementationTests.cs Removes the hybrid search exemption.
MEVD/​test/​SqlServer.ConformanceTests/​SqlServerIndexKindTests.cs Replaces the DiskANN early return with an explicit skip.
MEVD/​test/​SqlServer.ConformanceTests/​SqlServerHybridSearchTests.cs Adds conditional test execution and fixture initialization and cleanup.
MEVD/​test/​SqlServer.ConformanceTests/​SqlServer.ConformanceTests.csproj Restores compilation of hybrid search tests.

Review effort: Balanced

@Laurianti
Laurianti requested a review from adamsitnik November 20, 2026 14:37
@adamsitnik
adamsitnik requested a balanced review from Copilot November 20, 2026 14:43

@adamsitnik adamsitnik 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.

LGTM, thank you @Laurianti !

@adamsitnik
adamsitnik merged commit 69cfb1f into CommunityToolkit:main Nov 20, 2026
18 checks passed

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

There are no active review issues for the Azure SQL–dependent conformance test changes.

No open issues 🎉

Review effort: Balanced

@Laurianti
Laurianti deleted the sqlserver-conditional-azure-tests branch November 20, 2026 14:53
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.

Make Azure SQL tests conditional

3 participants