-
Notifications
You must be signed in to change notification settings - Fork 317
Test | Add flaky test quarantine zone #3856
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
base: main
Are you sure you want to change the base?
Conversation
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
This PR simplifies test filtering to support a quarantine zone for flaky tests by updating the --filter expressions in test execution targets. The changes remove platform-specific category exclusions and standardize filtering to only exclude tests marked as "failing" or "flaky" across all test types (Functional and Manual).
- Simplifies test filters to exclude only "failing" and "flaky" categories
- Removes platform-specific category filters that are no longer needed
- Applies consistent filtering logic across Functional and Manual test targets for both Windows and Unix platforms
build.proj
Outdated
| --collect "Code coverage" | ||
| --results-directory $(ResultsDirectory) | ||
| --filter "category!=nonnetcoreapptests&category!=failing&category!=nonlinuxtests&category!=nonuaptests" | ||
| --filter "category!=failing&category!=flaky" |
Copilot
AI
Dec 19, 2025
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.
The filter encoding is inconsistent with the Unit test targets. Unit tests use percent-encoded ampersands (%26) while Functional and Manual tests use XML entity encoding (&). For consistency and to avoid potential filtering issues, the encoding should match across all test targets. Consider using the same encoding pattern (%26) as used in the Unit test filters at lines 235 and 256.
build.proj
Outdated
| --collect "Code coverage" | ||
| --results-directory $(ResultsDirectory) | ||
| --filter "category!=non$(TargetGroup)tests&category!=failing&category!=nonwindowstests" | ||
| --filter "category!=failing&category!=flaky" |
Copilot
AI
Dec 19, 2025
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.
The filter encoding is inconsistent with the Unit test targets. Unit tests use percent-encoded ampersands (%26) while Functional and Manual tests use XML entity encoding (&). For consistency and to avoid potential filtering issues, the encoding should match across all test targets. Consider using the same encoding pattern (%26) as used in the Unit test filters at lines 235 and 256.
build.proj
Outdated
| --collect "Code coverage" | ||
| --results-directory $(ResultsDirectory) | ||
| --filter "category!=nonnetcoreapptests&category!=failing&category!=nonlinuxtests&category!=nonuaptests" | ||
| --filter "category!=failing&category!=flaky" |
Copilot
AI
Dec 19, 2025
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.
The filter encoding is inconsistent with the Unit test targets. Unit tests use percent-encoded ampersands (%26) while Functional and Manual tests use XML entity encoding (&). For consistency and to avoid potential filtering issues, the encoding should match across all test targets. Consider using the same encoding pattern (%26) as used in the Unit test filters at lines 235 and 256.
build.proj
Outdated
| --collect "Code coverage" | ||
| --results-directory $(ResultsDirectory) | ||
| --filter "category!=non$(TargetGroup)tests&category!=failing&category!=nonwindowstests" | ||
| --filter "category!=failing&category!=flaky" |
Copilot
AI
Dec 19, 2025
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.
The filter encoding is inconsistent with the Unit test targets. Unit tests use percent-encoded ampersands (%26) while Functional and Manual tests use XML entity encoding (&). For consistency and to avoid potential filtering issues, the encoding should match across all test targets. Consider using the same encoding pattern (%26) as used in the Unit test filters at lines 235 and 256.
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
Copilot reviewed 4 out of 4 changed files in this pull request and generated 12 comments.
| platform: '${{parameters.platform }}' | ||
| configuration: '${{parameters.buildConfiguration }}' | ||
| ${{ if eq(parameters.msbuildArchitecture, 'x64') }}: | ||
| msbuildArguments: '-t:RunFunctionalTests -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }} -p:Filter="category=flaky"' |
Copilot
AI
Dec 19, 2025
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.
The msbuildArguments value has mismatched quotes. The single quote after the closing parenthesis should come at the end of the line, not before the Filter parameter. This will cause a syntax error in the pipeline. The correct format should be: msbuildArguments: '-t:RunFunctionalTests -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }} -p:Filter="category=flaky"'
| platform: '${{parameters.platform }}' | ||
| configuration: '${{parameters.buildConfiguration }}' | ||
| ${{ if eq(parameters.msbuildArchitecture, 'x64') }}: | ||
| msbuildArguments: '-t:RunManualTests -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }} -p:Filter="category=flaky"' |
Copilot
AI
Dec 19, 2025
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.
The msbuildArguments value has mismatched quotes. The single quote after the closing parenthesis should come at the end of the line, not before the Filter parameter. This will cause a syntax error in the pipeline. The correct format should be: msbuildArguments: '-t:RunManualTests -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }} -p:Filter="category=flaky"'
build.proj
Outdated
| <FilterStatement>"$(Filter)"</FilterStatement> | ||
| <FilterStatement Condition="'$(FilterStatement)' == ''">"category!=failing&category!=flaky"</FilterStatement> |
Copilot
AI
Dec 19, 2025
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.
The FilterStatement logic has a flaw. When Filter is empty or not provided, line 226 sets FilterStatement to "$(Filter)" which evaluates to "" (a string containing two double quotes). However, line 227's condition checks if FilterStatement equals an empty string '', which will never be true. This means the default filter will never be applied when Filter is empty. The condition should check for '""' or the initial assignment should be changed to not include quotes around an empty Filter value.
build.proj
Outdated
| <FilterStatement>"$(Filter)"</FilterStatement> | ||
| <FilterStatement Condition="'$(FilterStatement)' == ''">"category!=failing&category!=flaky"</FilterStatement> |
Copilot
AI
Dec 19, 2025
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.
The FilterStatement logic has a flaw. When Filter is empty or not provided, line 249 sets FilterStatement to "$(Filter)" which evaluates to "" (a string containing two double quotes). However, line 250's condition checks if FilterStatement equals an empty string '', which will never be true. This means the default filter will never be applied when Filter is empty. The condition should check for '""' or the initial assignment should be changed to not include quotes around an empty Filter value.
build.proj
Outdated
| <FilterStatement>"$(Filter)"</FilterStatement> | ||
| <FilterStatement Condition="'$(FilterStatement)' == ''">"category!=failing&category!=flaky"</FilterStatement> |
Copilot
AI
Dec 19, 2025
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.
The FilterStatement logic has a flaw. When Filter is empty or not provided, line 328 sets FilterStatement to "$(Filter)" which evaluates to "" (a string containing two double quotes). However, line 329's condition checks if FilterStatement equals an empty string '', which will never be true. This means the default filter will never be applied when Filter is empty. The condition should check for '""' or the initial assignment should be changed to not include quotes around an empty Filter value.
| ${{ if eq(parameters.msbuildArchitecture, 'x64') }}: | ||
| msbuildArguments: '-t:RunUnitTests -p:TF=${{parameters.targetFramework }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }} -p:Filter="category=flaky"' | ||
| ${{ else }}: # x86 | ||
| msbuildArguments: '-t:RunUnitTests -p:TF=${{parameters.targetFramework }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }} -p:DotnetPath=${{parameters.dotnetx86RootPath }} -p:Filter="category=flaky"' |
Copilot
AI
Dec 19, 2025
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.
The msbuildArguments value has mismatched quotes. The single quote after the closing parenthesis should come at the end of the line, not before the Filter parameter. This will cause a syntax error in the pipeline. The correct format should be: msbuildArguments: '-t:RunUnitTests -p:TF=${{parameters.targetFramework }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }} -p:DotnetPath=${{parameters.dotnetx86RootPath }} -p:Filter="category=flaky"'
| ${{ if eq(parameters.msbuildArchitecture, 'x64') }}: | ||
| msbuildArguments: '-t:RunFunctionalTests -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }} -p:Filter="category=flaky"' | ||
| ${{ else }}: # x86 | ||
| msbuildArguments: '-t:RunFunctionalTests -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }} -p:DotnetPath=${{parameters.dotnetx86RootPath }} -p:Filter="category=flaky"' |
Copilot
AI
Dec 19, 2025
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.
The msbuildArguments value has mismatched quotes. The single quote after the closing parenthesis should come at the end of the line, not before the Filter parameter. This will cause a syntax error in the pipeline. The correct format should be: msbuildArguments: '-t:RunFunctionalTests -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }} -p:DotnetPath=${{parameters.dotnetx86RootPath }} -p:Filter="category=flaky"'
| ${{ if eq(parameters.msbuildArchitecture, 'x64') }}: | ||
| msbuildArguments: '-t:RunManualTests -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }} -p:Filter="category=flaky"' | ||
| ${{ else }}: # x86 | ||
| msbuildArguments: '-t:RunManualTests -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }} -p:DotnetPath=${{parameters.dotnetx86RootPath }} -p:Filter="category=flaky"' |
Copilot
AI
Dec 19, 2025
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.
The msbuildArguments value has mismatched quotes. The single quote after the closing parenthesis should come at the end of the line, not before the Filter parameter. This will cause a syntax error in the pipeline. The correct format should be: msbuildArguments: '-t:RunManualTests -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }} -p:DotnetPath=${{parameters.dotnetx86RootPath }} -p:Filter="category=flaky"'
build.proj
Outdated
| <FilterStatement>"$(Filter)"</FilterStatement> | ||
| <FilterStatement Condition="'$(FilterStatement)' == ''">"category!=failing&category!=flaky"</FilterStatement> |
Copilot
AI
Dec 19, 2025
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.
The FilterStatement logic has a flaw. When Filter is empty or not provided, line 275 sets FilterStatement to "$(Filter)" which evaluates to "" (a string containing two double quotes). However, line 276's condition checks if FilterStatement equals an empty string '', which will never be true. This means the default filter will never be applied when Filter is empty. The condition should check for '""' or the initial assignment should be changed to not include quotes around an empty Filter value.
build.proj
Outdated
| <FilterStatement>"$(Filter)"</FilterStatement> | ||
| <FilterStatement Condition="'$(FilterStatement)' == ''">"category!=failing&category!=flaky"</FilterStatement> |
Copilot
AI
Dec 19, 2025
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.
The FilterStatement logic has a flaw. When Filter is empty or not provided, line 300 sets FilterStatement to "$(Filter)" which evaluates to "" (a string containing two double quotes). However, line 301's condition checks if FilterStatement equals an empty string '', which will never be true. This means the default filter will never be applied when Filter is empty. The condition should check for '""' or the initial assignment should be changed to not include quotes around an empty Filter value.
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
Copilot reviewed 4 out of 4 changed files in this pull request and generated 9 comments.
| - task: MSBuild@1 | ||
| displayName: 'Run Flaky Unit Tests ${{parameters.msbuildArchitecture }}' | ||
| inputs: | ||
| solution: build.proj | ||
| msbuildArchitecture: ${{parameters.msbuildArchitecture }} | ||
| platform: '${{parameters.platform }}' | ||
| configuration: '${{parameters.buildConfiguration }}' | ||
| ${{ if eq(parameters.msbuildArchitecture, 'x64') }}: | ||
| msbuildArguments: '-t:RunUnitTests -p:TF=${{parameters.targetFramework }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }} -p:Filter="category=flaky"' | ||
| ${{ else }}: # x86 | ||
| msbuildArguments: '-t:RunUnitTests -p:TF=${{parameters.targetFramework }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }} -p:DotnetPath=${{parameters.dotnetx86RootPath }} -p:Filter="category=flaky"' | ||
| continueOnError: true |
Copilot
AI
Dec 19, 2025
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.
The regular Unit Tests task is missing the retryCountOnTaskFailure property that was removed from the diff. While the flaky unit tests don't need retry logic (they use continueOnError), the regular unit tests should still have retry capability. The original configuration had retryCountOnTaskFailure: 1 for unit tests, which should be retained on the regular unit test task at line 64.
| - task: MSBuild@1 | ||
| displayName: 'Run Flaky Functional Tests ${{parameters.msbuildArchitecture }}' | ||
| inputs: | ||
| solution: build.proj | ||
| msbuildArchitecture: ${{parameters.msbuildArchitecture }} | ||
| platform: '${{parameters.platform }}' | ||
| configuration: '${{parameters.buildConfiguration }}' | ||
| ${{ if eq(parameters.msbuildArchitecture, 'x64') }}: | ||
| msbuildArguments: '-t:RunFunctionalTests -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }} -p:Filter="category=flaky"' | ||
| ${{ else }}: # x86 | ||
| msbuildArguments: '-t:RunFunctionalTests -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }} -p:DotnetPath=${{parameters.dotnetx86RootPath }} -p:Filter="category=flaky"' | ||
| continueOnError: true |
Copilot
AI
Dec 19, 2025
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.
The regular Functional Tests task is missing the retryCountOnTaskFailure property that was removed from the diff. The original configuration had retryCountOnTaskFailure: 1 for functional tests, which should be retained on the regular functional test task at line 88.
| - task: DotNetCoreCLI@2 | ||
| displayName: 'Run Flaky Unit Tests' | ||
| inputs: | ||
| command: custom | ||
| projects: build.proj | ||
| custom: msbuild | ||
| arguments: '-t:RunUnitTests -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }} -p:platform=${{parameters.platform }} -p:Configuration=${{parameters.buildConfiguration }} -p:Filter="category=flaky"' | ||
| verbosityRestore: Detailed | ||
| verbosityPack: Detailed | ||
| continueOnError: true |
Copilot
AI
Dec 19, 2025
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.
The regular Unit Tests task is missing the retryCountOnTaskFailure property that was removed from the diff. The original configuration had retryCountOnTaskFailure: 1 for unit tests, which should be retained on the regular unit test task at line 141.
| - task: DotNetCoreCLI@2 | ||
| displayName: 'Run Flaky Functional Tests' | ||
| inputs: | ||
| command: custom | ||
| projects: build.proj | ||
| custom: msbuild | ||
| arguments: '-t:RunFunctionalTests -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }} -p:platform=${{parameters.platform }} -p:Configuration=${{parameters.buildConfiguration }} -p:Filter="category=flaky"' | ||
| verbosityRestore: Detailed | ||
| verbosityPack: Detailed | ||
| continueOnError: true |
Copilot
AI
Dec 19, 2025
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.
The regular Functional Tests task is missing the retryCountOnTaskFailure property that was removed from the diff. The original configuration had retryCountOnTaskFailure: 1 for functional tests, which should be retained on the regular functional test task at line 163.
| <!-- Run all Functional tests applicable to Unix. --> | ||
| <Target Name="RunFunctionalTestsUnix" Condition="'$(IsEnabledWindows)' != 'true'"> | ||
| <PropertyGroup> | ||
| <PropertyGroup> |
Copilot
AI
Dec 19, 2025
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.
Inconsistent indentation: The opening <PropertyGroup> tag has an extra space of indentation compared to other similar targets. It should be indented with 4 spaces to align with the same element in other targets like RunFunctionalTestsWindows at line 274.
| <PropertyGroup> | |
| <PropertyGroup> |
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
Copilot reviewed 8 out of 8 changed files in this pull request and generated 13 comments.
| --collect "Code coverage" | ||
| --results-directory $(ResultsDirectory) | ||
| --filter "category!=nonnetcoreapptests&category!=failing&category!=nonlinuxtests&category!=nonuaptests" | ||
| --filter "$(FilterStatement)" |
Copilot
AI
Dec 20, 2025
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.
The filter has been changed from "category!=nonnetcoreapptests&category!=failing&category!=nonlinuxtests&category!=nonuaptests" to "category!=failing&category!=flaky". This removes important platform and framework-specific test exclusions. Tests tagged with 'nonnetcoreapptests', 'nonlinuxtests', or 'nonuaptests' will now run even though they aren't compatible with this configuration. The filter should be: "category!=nonnetcoreapptests&category!=failing&category!=nonlinuxtests&category!=nonuaptests&category!=flaky"
| custom: msbuild | ||
| arguments: '-t:RunFunctionalTests -p:TF=${{parameters.targetFramework }} -p:TestSet=${{parameters.testSet }} -p:ReferenceType=${{parameters.referenceType }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.nugetPackageVersion }} -p:platform=${{parameters.platform }} -p:Configuration=${{parameters.buildConfiguration }}' | ||
| verbosityRestore: Detailed | ||
| verbosityPack: Detailed |
Copilot
AI
Dec 20, 2025
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.
The diff shows that retryCountOnTaskFailure: 1 and condition: and(succeeded(), ne(variables['Agent.OS'], 'Windows_NT')) were removed from the Functional Tests task. This means functional tests will run even if previous tasks failed and won't retry on transient failures. These changes appear unintentional and should be restored.
| verbosityPack: Detailed | |
| verbosityPack: Detailed | |
| condition: and(succeeded(), ne(variables['Agent.OS'], 'Windows_NT')) | |
| retryCountOnTaskFailure: 1 |
| command: test | ||
| projects: 'src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.FunctionalTests.csproj' | ||
| arguments: '-p:Platform=${{parameters.platform }} -p:TestTargetOS="${{parameters.TestTargetOS }}" -p:TargetNetFxVersion=${{parameters.TargetNetFxVersion }} -p:ReferenceType=${{parameters.referenceType }} -p:Configuration=${{parameters.buildConfiguration }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.NugetPackageVersion }} --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" --collect "Code Coverage"' | ||
| arguments: '-p:Platform=${{parameters.platform }} -p:TestTargetOS="${{parameters.TestTargetOS }}" -p:TargetNetFxVersion=${{parameters.TargetNetFxVersion }} -p:ReferenceType=${{parameters.referenceType }} -p:Configuration=${{parameters.buildConfiguration }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.NugetPackageVersion }} --no-build -v n --filter "category!=failing&category!=flaky" --collect "Code Coverage"' |
Copilot
AI
Dec 20, 2025
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.
The filter has been changed from excluding nonnetfxtests, failing, and nonwindowstests to only excluding failing and flaky tests. This means tests tagged with 'nonnetfxtests' or 'nonwindowstests' will now run in this pipeline, which could cause failures if those tests aren't compatible with .NET Framework or Windows. The filter should maintain the original exclusions: "category!=nonnetfxtests&category!=failing&category!=nonwindowstests&category!=flaky"
| command: test | ||
| projects: 'src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj' | ||
| arguments: '-p:Platform=${{parameters.platform }} -p:TestTargetOS="${{parameters.TestTargetOS }}" -p:TargetNetCoreVersion=${{parameters.TargetNetCoreVersion }} -p:ReferenceType=${{parameters.referenceType }} -p:Configuration=${{parameters.buildConfiguration }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.NugetPackageVersion }} --no-build -v n --filter category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests --collect "Code Coverage"' | ||
| arguments: '-p:Platform=${{parameters.platform }} -p:TestTargetOS="${{parameters.TestTargetOS }}" -p:TargetNetCoreVersion=${{parameters.TargetNetCoreVersion }} -p:ReferenceType=${{parameters.referenceType }} -p:Configuration=${{parameters.buildConfiguration }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.NugetPackageVersion }} --no-build -v n --filter "category!=failing&category!=flaky" --collect "Code Coverage"' |
Copilot
AI
Dec 20, 2025
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.
The filter has been changed from excluding nonnetcoreapptests, failing, and nonwindowstests to only excluding failing and flaky tests. This means tests tagged with 'nonnetcoreapptests' or 'nonwindowstests' will now run in this pipeline, which could cause failures if those tests aren't compatible with .NET Core or Windows. The filter should maintain the original exclusions: "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests&category!=flaky"
| --collect "Code coverage" | ||
| --results-directory $(ResultsDirectory) | ||
| --filter "category!=nonnetcoreapptests&category!=failing&category!=nonlinuxtests&category!=nonuaptests" | ||
| --filter "$(FilterStatement)" |
Copilot
AI
Dec 20, 2025
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.
The filter has been changed from "category!=nonnetcoreapptests&category!=failing&category!=nonlinuxtests&category!=nonuaptests" to "category!=failing&category!=flaky". This removes important platform and framework-specific test exclusions. Tests tagged with 'nonnetcoreapptests', 'nonlinuxtests', or 'nonuaptests' will now run even though they aren't compatible with this configuration. The filter should be: "category!=nonnetcoreapptests&category!=failing&category!=nonlinuxtests&category!=nonuaptests&category!=flaky"
| --collect "Code coverage" | ||
| --results-directory $(ResultsDirectory) | ||
| --filter "category!=non$(TargetGroup)tests&category!=failing&category!=nonwindowstests" | ||
| --filter "$(FilterStatement)" |
Copilot
AI
Dec 20, 2025
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.
The filter has been changed from "category!=non$(TargetGroup)tests&category!=failing&category!=nonwindowstests" to "category!=failing&category!=flaky". This removes important platform and framework-specific test exclusions. Tests tagged with 'non$(TargetGroup)tests' or 'nonwindowstests' will now run even though they aren't compatible with this configuration. The filter should be: "category!=non$(TargetGroup)tests&category!=failing&category!=nonwindowstests&category!=flaky"
| command: test | ||
| projects: 'src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj' | ||
| arguments: '-p:Platform=${{parameters.platform }} -p:TestTargetOS="${{parameters.TestTargetOS }}" -p:TargetNetFxVersion=${{parameters.TargetNetFxVersion }} -p:ReferenceType=${{parameters.referenceType }} -p:Configuration=${{parameters.buildConfiguration }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.NugetPackageVersion }} --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" --collect "Code Coverage"' | ||
| arguments: '-p:Platform=${{parameters.platform }} -p:TestTargetOS="${{parameters.TestTargetOS }}" -p:TargetNetFxVersion=${{parameters.TargetNetFxVersion }} -p:ReferenceType=${{parameters.referenceType }} -p:Configuration=${{parameters.buildConfiguration }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.NugetPackageVersion }} --no-build -v n --filter "category!=failing&category!=flaky" --collect "Code Coverage"' |
Copilot
AI
Dec 20, 2025
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.
The filter has been changed from excluding nonnetfxtests, failing, and nonwindowstests to only excluding failing and flaky tests. This means tests tagged with 'nonnetfxtests' or 'nonwindowstests' will now run in this pipeline, which could cause failures if those tests aren't compatible with .NET Framework or Windows. The filter should maintain the original exclusions: "category!=nonnetfxtests&category!=failing&category!=nonwindowstests&category!=flaky"
| command: test | ||
| projects: 'src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.FunctionalTests.csproj' | ||
| arguments: '-p:Platform=${{parameters.platform }} -p:TestTargetOS="${{parameters.TestTargetOS }}" -p:TargetNetCoreVersion=${{parameters.TargetNetCoreVersion }} -p:ReferenceType=${{parameters.referenceType }} -p:Configuration=${{parameters.buildConfiguration }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.NugetPackageVersion }} --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests"' | ||
| arguments: '-p:Platform=${{parameters.platform }} -p:TestTargetOS="${{parameters.TestTargetOS }}" -p:TargetNetCoreVersion=${{parameters.TargetNetCoreVersion }} -p:ReferenceType=${{parameters.referenceType }} -p:Configuration=${{parameters.buildConfiguration }} -p:TestMicrosoftDataSqlClientVersion=${{parameters.NugetPackageVersion }} --no-build -v n --filter "category!=failing&category!=flaky"' |
Copilot
AI
Dec 20, 2025
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.
The filter has been changed from excluding nonnetcoreapptests, failing, and nonwindowstests to only excluding failing and flaky tests. This means tests tagged with 'nonnetcoreapptests' or 'nonwindowstests' will now run in this pipeline, which could cause failures if those tests aren't compatible with .NET Core or Windows. The filter should maintain the original exclusions: "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests&category!=flaky"
| --collect "Code coverage" | ||
| --results-directory $(ResultsDirectory) | ||
| --filter "category!=non$(TargetGroup)tests&category!=failing&category!=nonwindowstests" | ||
| --filter "$(FilterStatement)" |
Copilot
AI
Dec 20, 2025
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.
The filter has been changed from "category!=non$(TargetGroup)tests&category!=failing&category!=nonwindowstests" to "category!=failing&category!=flaky". This removes important platform and framework-specific test exclusions. Tests tagged with 'non$(TargetGroup)tests' or 'nonwindowstests' will now run even though they aren't compatible with this configuration. The filter should be: "category!=non$(TargetGroup)tests&category!=failing&category!=nonwindowstests&category!=flaky"
|
Can we also include the diagnostic testing please? These seemed to be flaky on ARM64. |
paulmedynski
left a comment
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.
Approved, assuming the Copilot comments will be addressed.
At the moment, we have a number of flaky tests in our pipelines (a couple of which I'll take credit for) that cause random failures, necessitate pipeline reruns, and cheapen the value of our regression testing suite. When tests fail regularly, we pay less attention when we see a failing test. A common pattern to deal with flaky tests is to establish a "quarantine zone" where these tests can live temporarily until they're improved. The quarantine zone is separate from the main build pipelines and does not block main builds, but runs regularly so that we can keep an eye on how flaky tests are performing.
To establish a quarantine zone, I'm planning to use the "flaky" category introduced in this PR: #3488. Tests in this category will be run in a separate testing stage immediately after the corresponding Unit/Functional/Manual testing stage (e.g. Unit => UnitFlaky => Functional => FunctionalFlaky ...). The flaky test stage will not block the pipeline, and failures will be ignored using the continueOnError property: steps.task definition | Microsoft Learn
The ActiveIssue tag will remain reserved for tests that cannot pass due to a platform specific bug, pipeline issue, or other limitation that causes the test to always fail.
I started off by tagging our top offenders based on this dashboard. As we discover more flaky tests, the DRI (or anyone) can open a PR adding the flaky tag to the offending tests. Flaky tests can be addressed either via prioritization during sprint planning or when working on a related section of code.