Skip to content

[7.0.3 Cherry-pick] AE tests: create ConversionTests keys once per class to slow error 3807 identifier exhaustion - #4485

Open
github-actions[bot] wants to merge 2 commits into
release/7.0from
dev/automation/pr-4478-to-7.0.3
Open

[7.0.3 Cherry-pick] AE tests: create ConversionTests keys once per class to slow error 3807 identifier exhaustion#4485
github-actions[bot] wants to merge 2 commits into
release/7.0from
dev/automation/pr-4478-to-7.0.3

Conversation

@github-actions

@github-actions github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown

Description

Backports #4478 to release/7.0 for the 7.0.3 servicing release. The cherry-pick conflicts have been resolved manually.

This fixes recurring SQL Server error 3807 (Create failed because all available identifiers have been exhausted.) in the Always Encrypted manual tests. ConversionTests previously created a Column Master Key and Column Encryption Key for every test case, advancing SQL Server's monotonic per-database identifier counter even after the keys were dropped.

The change adds an IClassFixture that creates the keys once per test class and drops them when the fixture is disposed. Per-test tables continue to be created and dropped for each case. This substantially reduces key identifier consumption without changing the public API.

Issues

Backport of #4478.

Testing

  • Source change validated by sqlclient-ci-kerberos run 20260727.4.
  • Cherry-pick conflicts resolved against release/7.0; resulting branch contains the expected two-file change.

@github-actions github-actions Bot added this to the 7.0.3 milestone Jul 29, 2026
@github-project-automation github-project-automation Bot moved this to To triage in SqlClient Board Jul 29, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@paulmedynski
paulmedynski force-pushed the dev/automation/pr-4478-to-7.0.3 branch from 14dd39e to f255ee5 Compare July 29, 2026 16:39
@paulmedynski paulmedynski changed the title [7.0.3 Cherry-pick - CONFLICTS] AE tests: create ConversionTests keys once per class to slow error 3807 identifier exhaustion [7.0.3 Cherry-pick] AE tests: create ConversionTests keys once per class to slow error 3807 identifier exhaustion Jul 29, 2026
paulmedynski
paulmedynski previously approved these changes Jul 29, 2026
@paulmedynski
paulmedynski marked this pull request as ready for review July 29, 2026 16:44
@paulmedynski
paulmedynski requested a review from a team as a code owner July 29, 2026 16:44
Copilot AI review requested due to automatic review settings July 29, 2026 16:44
@paulmedynski paulmedynski self-assigned this Jul 29, 2026
@paulmedynski paulmedynski moved this from To triage to In review in SqlClient Board Jul 29, 2026
@paulmedynski
paulmedynski enabled auto-merge (squash) July 29, 2026 16:45

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.

Pull request overview

Backport of the upstream fix to reduce SQL Server error 3807 (“identifier exhaustion”) in Always Encrypted manual tests by creating the CMK/CEK once per ConversionTests class instead of once per test case.

Changes:

  • Added ConversionTestFixture (IClassFixture) that creates a shared CMK+CEK once per test class and drops them on fixture disposal.
  • Refactored ConversionTests to consume the shared CEK from the fixture and to only drop per-test tables in Dispose().

Reviewed changes

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

File Description
src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/TestFixtures/ConversionTestFixture.cs New class fixture that creates/drops shared CMK/CEK for ConversionTests.
src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/ConversionTests.cs Switches from per-test constructor key creation to using the shared fixture CEK; keeps per-test table lifecycle.

@paulmedynski

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

3 participants