Split MSSQL integration tests into parallel pipeline jobs and remove MSSQL category from generic unit tests#3245
Open
aaronburtle wants to merge 13 commits intomainfrom
Open
Conversation
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts test categorization and the MSSQL Azure Pipelines setup so unit tests run in the “Unit Tests” pipeline (instead of the MSSQL integration pipeline) and MSSQL integration tests are split into parallel Windows jobs using a shared steps template.
Changes:
- Removed
TestCategory(TestCategory.MSSQL)from several DB-independent unit test classes so they run under the general unit-test pipeline filter. - Refactored
.pipelines/mssql-pipelines.ymlto run two parallel Windows jobs (windows_combinedandwindows_configuration) using a new shared template. - Added
.pipelines/templates/mssql-test-steps.ymlto centralize common MSSQL test-job steps (LocalDB setup, build, config generation, test execution, coverage, and artifact publishing).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/Service.Tests/UnitTests/RuntimeConfigLoaderJsonDeserializerTests.cs | Removes MSSQL test category so these are treated as general unit tests. |
| src/Service.Tests/UnitTests/RestServiceUnitTests.cs | Removes MSSQL test category so these are treated as general unit tests. |
| src/Service.Tests/UnitTests/RequestValidatorUnitTests.cs | Removes MSSQL test category so these are treated as general unit tests. |
| src/Service.Tests/UnitTests/RequestContextUnitTests.cs | Removes MSSQL test category so these are treated as general unit tests. |
| src/Service.Tests/UnitTests/EntitySourceNamesParserUnitTests.cs | Removes MSSQL test category so these are treated as general unit tests. |
| .pipelines/templates/mssql-test-steps.yml | Introduces reusable MSSQL job steps template (but currently has a failure-artifact publishing logic bug). |
| .pipelines/mssql-pipelines.yml | Splits Windows MSSQL integration tests into two parallel jobs using the shared template. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why make this change?
Closes #3244
What is this change?
This PR makes two changes to improve MSSQL integration test pipeline performance:
Removed TestCategory(TestCategory.MSSQL) from 5 unit test files that are not MSSQL-specific. These tests do not require a database and should run in the unit test pipeline instead:
Split the single Windows MSSQL integration test job into 2 parallel jobs to reduce execution time:
Windows - Combined Integration Tests: GraphQL, REST, Unit, HotReload, OpenApi, Authorization, Telemetry, and Caching tests (1,246 tests). SqlTestBase-inheriting tests (GraphQL, REST) naturally create the DB schema for the co-located tests.
Window - Configuration Tests: Pure ConfigurationTests (207 tests). Since this job has no SqlTestBase tests, a System.Data.SqlClient-based schema initialization step creates the DB schema before test execution.
A new reusable step template
mssql-test-steps.ymlavoids duplicating the ~130 lines of shared setup (NuGet auth, .NET SDK, LocalDB install/start, build, test, coverage publish) across the 2 jobs. It includes an optionalinitDbSchemaparameter for jobs that need explicit schema creation.How was this tested?
Run against the pipeline.