Skip to content

Conversation

paulmedynski
Copy link
Contributor

@paulmedynski paulmedynski commented Sep 3, 2025

Description

  • Fixed the unique name generators to:
    • Keep max lengths to 30 and 96 characters respectively.
    • Ensure sufficient uniqueness even when truncation occurs.

- Fixed the unique name generators to:
  - Keep max lengths to 30 and 96 characters respectively.
  - Ensure uniqueness at the start of the names.
@paulmedynski paulmedynski added this to the 7.0-preview1 milestone Sep 3, 2025
@Copilot Copilot AI review requested due to automatic review settings September 3, 2025 13:59
@paulmedynski paulmedynski requested a review from a team as a code owner September 3, 2025 13:59
- Increased long name suffix to 32 characters.
Copy link
Contributor

@Copilot 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 fixes unique database object name generation in the SqlClient test suite to resolve maximum length issues and ensure proper uniqueness. The changes update various test files to use new naming methods (GetShortName and GetLongName) instead of the deprecated GetUniqueName and GetUniqueNameForSqlServer methods.

  • Updates name generators to maintain maximum lengths of 30 and 96 characters respectively
  • Replaces deprecated naming methods across all test files with appropriate alternatives
  • Implements new uniqueness generation logic using GUID parts and consistent formatting

Reviewed Changes

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

Show a summary per file
File Description
DataTestUtility.cs Core implementation of new GetShortName and GetLongName methods with proper length limits
VectorTypeBackwardCompatibilityTests.cs Updated vector test table and procedure names to use GetShortName
NativeVectorFloat32Tests.cs Updated vector test names to use GetShortName
Multiple UdtTest files Updated UDT test names to use GetLongName for tables and procedures
Multiple SqlBulkCopyTest files Updated bulk copy test names to use appropriate naming methods
Multiple other test files Systematic replacement of deprecated naming methods across test suite

paulmedynski and others added 2 commits September 3, 2025 11:10
- Replaced range operators with Substring() since .NET Framework doesn't have ranges.
- Replaced '-' with '_' to avoid T-SQL syntax issues.
- Swapped the suffix into a prefix.
- Added debugging to see what the names look like when failures occur.
Copy link
Contributor Author

@paulmedynski paulmedynski left a comment

Choose a reason for hiding this comment

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

Commentary for myself.

- Removed debugging console emission, since it breaks fragile tests!
- Added link to database identifier syntax.
@paulmedynski
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@paulmedynski
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

Copy link

codecov bot commented Sep 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.31%. Comparing base (cd3dbd1) to head (3352ab8).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3597      +/-   ##
==========================================
+ Coverage   65.48%   66.31%   +0.82%     
==========================================
  Files         275      275              
  Lines       61518    61518              
==========================================
+ Hits        40288    40797     +509     
+ Misses      21230    20721     -509     
Flag Coverage Δ
addons 90.82% <ø> (ø)
netcore 67.62% <ø> (-0.04%) ⬇️
netfx 70.39% <ø> (+1.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@paulmedynski paulmedynski merged commit 1297673 into main Sep 5, 2025
250 checks passed
@paulmedynski paulmedynski deleted the dev/paul/unique-name branch September 5, 2025 12:30
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.

4 participants