-
Notifications
You must be signed in to change notification settings - Fork 314
[6.1] Add Stress Tests to CI #3565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
(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.
There was a problem hiding this 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.
src/Microsoft.Data.SqlClient/tests/StressTests/SqlClient.Stress.Tests/SqlClientTestGroup.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/StressTests/SqlClient.Stress.Tests/SqlClientTestGroup.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/StressTests/SqlClient.Stress.Tests/SqlClientTestGroup.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/StressTests/SqlClient.Stress.Runner/Program.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/StressTests/SqlClient.Stress.Framework/StressConfigReader.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/StressTests/SqlClient.Stress.Runner/Monitor/FakeConsole.cs
Show resolved
Hide resolved
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The latest CI-SqlClient run for this PR is all green: This PR can be merged once approved. |
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.