Skip to content

Commit 57ed673

Browse files
authored
FEAT: Add stress test pipeline and migrate it to new 1ES Pool/Images (#432)
### Work Item / Issue Reference <!-- IMPORTANT: Please follow the PR template guidelines below. For mssql-python maintainers: Insert your ADO Work Item ID below For external contributors: Insert Github Issue number below Only one reference is required - either GitHub issue OR ADO Work Item. --> <!-- mssql-python maintainers: ADO Work Item --> > [AB#41877](https://sqlclientdrivers.visualstudio.com/c6d89619-62de-46a0-8b46-70b92a84d85e/_workitems/edit/41877) <!-- External contributors: GitHub Issue --> > GitHub Issue: #<ISSUE_NUMBER> ------------------------------------------------------------------- ### Summary <!-- Insert your summary of changes below. Minimum 10 characters required. --> This pull request adds a comprehensive suite of multi-threaded stress tests for the `mssql-python` package. The new tests cover a wide range of concurrency scenarios, sustained load, pool lifecycle, and heavy query scaling to ensure robust performance and stability under high-load conditions. The tests are cross-platform, feature deterministic shutdowns, and include adaptive validation of error rates. Concurrency and load testing: * Added a concurrency matrix of tests (`test_concurrency_matrix`) that runs queries with varying thread counts and connection pooling settings, validating error rates at different concurrency levels. * Introduced sustained load tests (`test_sustained_load`) that run multiple threads for extended durations to simulate real-world high-load situations. * Implemented heavy query scaling tests (`test_heavy_query_scaling`) with large result sets and high thread counts to stress test the connection pool. Connection pool management: * Added a pool lifecycle test (`test_pool_lifecycle_cycles`) to repeatedly enable and disable connection pooling, verifying deterministic shutdown and resource cleanup. * Provided utilities for strict thread joining and pool shutdown to ensure clean test teardown and avoid resource leaks. Test infrastructure and utilities: * Defined data models (`ThreadResult`, `StressResult`) and a runner class (`MultiThreadedQueryRunner`) for collecting detailed metrics and managing <!-- ### PR Title Guide > For feature requests FEAT: (short-description) > For non-feature requests like test case updates, config updates , dependency updates etc CHORE: (short-description) > For Fix requests FIX: (short-description) > For doc update requests DOC: (short-description) > For Formatting, indentation, or styling update STYLE: (short-description) > For Refactor, without any feature changes REFACTOR: (short-description) > For release related changes, without any feature changes RELEASE: #<RELEASE_VERSION> (short-description) ### Contribution Guidelines External contributors: - Create a GitHub issue first: https://github.com/microsoft/mssql-python/issues/new - Link the GitHub issue in the "GitHub Issue" section above - Follow the PR title format and provide a meaningful summary mssql-python maintainers: - Create an ADO Work Item following internal processes - Link the ADO Work Item in the "ADO Work Item" section above - Follow the PR title format and provide a meaningful summary -->
1 parent 9f78a27 commit 57ed673

3 files changed

Lines changed: 1459 additions & 0 deletions

File tree

0 commit comments

Comments
 (0)