Skip to content

Conversation

paulmedynski
Copy link
Contributor

Description

Port of 3 PRs from main: #3546, #3548. #3558.

Adding stress tests runs to CI. These will use 1ES images for Windows and Linux, and Azure Pipelines macos-latest for macOS. All tests run against a locally installed SQL Server using SQL auth.

CI pipelines disable stress tests by default. You can manually run the pipelines with stress tests enabled.

(This code is effectively dead since it is not being referenced anywhere, and there are no other changes to the code. As such, we can bypass the one flaky test failure.)
* Minimal modifications to get the stress tests building and running on Linux.

* Updated sample config to avoid a dummy password.
- Added config file path configuration via STRESS_CONFIG_FILE environment variable.
- Added support for JSON config file.
- Fixed process exit code to reflect success vs failure.
- Added emission to console.
- Added emission of data source.
- Added EntraId password-based auth.
- Added CI stage.
- Added NuGet package version to MDS assembly.
- Added dotnet build configuration pararmeter to CI entry points.
- Added MDS package version configurability to stress tests.
- Added all target frameworks that MDS supports.
- Each test run now creates and drops its own database to avoid collisions.
- Moved to 1ES images where possible.
- Using a local SQL Server that we setup as part of CI.
- Added top-level pipeline flag to enable stress tests, deafult is false until tests are reliably passing.
@paulmedynski paulmedynski added this to the 6.1.1 milestone Aug 14, 2025
@Copilot Copilot AI review requested due to automatic review settings August 14, 2025 09:55
@paulmedynski paulmedynski requested a review from a team as a code owner August 14, 2025 09:55
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

The PR adds stress tests to CI by porting three PRs from main branch (#3546, #3548, #3558). It introduces a comprehensive stress testing framework that can run against locally installed SQL Server using SQL authentication. The stress tests are disabled by default in CI pipelines but can be manually enabled.

Key changes include:

  • Addition of a complete stress testing framework with multiple projects
  • Configuration system supporting both XML and JSON config files
  • Test runners with various execution modes (stress, multithreaded, thread pool)
  • SQL Server specific test implementations covering async operations, MARS, XML handling, and streaming

Reviewed Changes

Copilot reviewed 69 out of 69 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tools/targets/GenerateThisAssemblyCs.targets Adds NuGetPackageVersion constant for version tracking
src/Microsoft.Data.SqlClient/tests/StressTests/StressTests.slnx Solution file defining stress test project structure
src/Microsoft.Data.SqlClient/tests/StressTests/SqlClient.Stress.Tests/* Main test implementations for SqlClient stress scenarios
src/Microsoft.Data.SqlClient/tests/StressTests/SqlClient.Stress.Runner/* Test execution engine and harness infrastructure
src/Microsoft.Data.SqlClient/tests/StressTests/SqlClient.Stress.Framework/* Core framework classes and utilities
src/Microsoft.Data.SqlClient/tests/StressTests/SqlClient.Stress.Common/* Common attributes and base classes
Comments suppressed due to low confidence (1)

src/Microsoft.Data.SqlClient/tests/StressTests/SqlClient.Stress.Tests/SqlClientTestGroup.cs:278

  • The method documentation comment is incomplete. It should describe the parameters, return value, and what the method does beyond just 'Utility function used by async tests'.
        /// <summary>

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@paulmedynski
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@cheenamalhotra cheenamalhotra removed this from the 6.1.1 milestone Aug 14, 2025
Copy link

codecov bot commented Aug 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.64%. Comparing base (7a7b54e) to head (cf441ee).
⚠️ Report is 8 commits behind head on release/6.1.

Additional details and impacted files
@@               Coverage Diff               @@
##           release/6.1    #3565      +/-   ##
===============================================
- Coverage        69.69%   64.64%   -5.05%     
===============================================
  Files              281      279       -2     
  Lines            62413    61748     -665     
===============================================
- Hits             43500    39920    -3580     
- Misses           18913    21828    +2915     
Flag Coverage Δ
addons 90.82% <ø> (ø)
netcore 67.06% <ø> (-5.70%) ⬇️
netfx 68.08% <ø> (-1.16%) ⬇️

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
Copy link
Contributor Author

paulmedynski commented Aug 15, 2025

The latest CI-SqlClient run for this PR is all green:
https://sqlclientdrivers.visualstudio.com/public/_build/results?buildId=122987&view=results
GitHub is confused and reporting unrelated status from a manual run of CI from this branch.

This PR can be merged once approved.

@apoorvdeshmukh apoorvdeshmukh self-assigned this Aug 27, 2025
@paulmedynski paulmedynski merged commit d2f2f26 into release/6.1 Aug 28, 2025
129 of 131 checks passed
@paulmedynski paulmedynski deleted the dev/paul/release/6.1-stress-ci branch August 28, 2025 15:28
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.

5 participants