-
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?
Changes from all commits
fa22414
dba39e7
13b684c
8a4f8e0
4d14a1e
ae19c47
29ecebc
3413a96
4c4cf1e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -223,6 +223,8 @@ | |||||
| <!-- Run all unit tests applicable to Windows. --> | ||||||
| <Target Name="RunUnitTestsWindows" Condition="'$(IsEnabledWindows)' == 'true' AND $(ReferenceType.Contains('Project'))"> | ||||||
| <PropertyGroup> | ||||||
| <FilterStatement>$(Filter)</FilterStatement> | ||||||
| <FilterStatement Condition="'$(FilterStatement)' == ''">category!=failing&category!=flaky</FilterStatement> | ||||||
| <TestCommand> | ||||||
| $(DotnetPath)dotnet test "@(UnitTestsProj)" | ||||||
| --no-build | ||||||
|
|
@@ -232,18 +234,20 @@ | |||||
| -p:TestTargetOS=Windows$(TargetGroup) | ||||||
| --collect "Code coverage" | ||||||
| --results-directory $(ResultsDirectory) | ||||||
| --filter "category!=failing%26category!=flaky" | ||||||
| --filter "$(FilterStatement)" | ||||||
| --logger:"trx;LogFilePrefix=Unit-Windows$(TargetGroup)-$(TestSet)" | ||||||
| </TestCommand> | ||||||
| <TestCommand>$(TestCommand.Replace($([System.Environment]::NewLine), " "))</TestCommand> | ||||||
| </PropertyGroup> | ||||||
| <Message Text=">>> Running unit tests for Windows via command: $(TestCommand)"/> | ||||||
| <Exec ConsoleToMsBuild="true" Command="$(TestCommand)"/> | ||||||
|
Check failure on line 243 in build.proj
|
||||||
| </Target> | ||||||
|
|
||||||
| <!-- Run all unit tests applicable to Unix. --> | ||||||
| <Target Name="RunUnitTestsUnix" Condition="'$(IsEnabledWindows)' != 'true' AND $(ReferenceType.Contains('Project'))"> | ||||||
| <PropertyGroup> | ||||||
| <FilterStatement>$(Filter)</FilterStatement> | ||||||
| <FilterStatement Condition="'$(FilterStatement)' == ''">category!=failing&category!=flaky</FilterStatement> | ||||||
| <TestCommand> | ||||||
| $(DotnetPath)dotnet test "@(UnitTestsProj)" | ||||||
| --no-build | ||||||
|
|
@@ -253,7 +257,7 @@ | |||||
| -p:TestTargetOS=Unixnetcoreapp | ||||||
| --collect "Code coverage" | ||||||
| --results-directory $(ResultsDirectory) | ||||||
| --filter "category!=failing%26category!=flaky" | ||||||
| --filter "$(FilterStatement)" | ||||||
| --logger:"trx;LogFilePrefix=Unit-Unixnetcoreapp-$(TestSet)" | ||||||
| </TestCommand> | ||||||
| <TestCommand>$(TestCommand.Replace($([System.Environment]::NewLine), " "))</TestCommand> | ||||||
|
|
@@ -268,6 +272,8 @@ | |||||
| <!-- Run all Functional tests applicable to Windows. --> | ||||||
| <Target Name="RunFunctionalTestsWindows" Condition="'$(IsEnabledWindows)' == 'true'"> | ||||||
| <PropertyGroup> | ||||||
| <FilterStatement>$(Filter)</FilterStatement> | ||||||
| <FilterStatement Condition="'$(FilterStatement)' == ''">category!=failing&category!=flaky</FilterStatement> | ||||||
| <TestCommand> | ||||||
| $(DotnetPath)dotnet test "@(FunctionalTestsProj)" | ||||||
| --no-build | ||||||
|
|
@@ -279,7 +285,7 @@ | |||||
| -p:TestTargetOS=Windows$(TargetGroup) | ||||||
| --collect "Code coverage" | ||||||
| --results-directory $(ResultsDirectory) | ||||||
| --filter "category!=non$(TargetGroup)tests&category!=failing&category!=nonwindowstests" | ||||||
| --filter "$(FilterStatement)" | ||||||
| --logger:"trx;LogFilePrefix=Functional-Windows$(TargetGroup)-$(TestSet)" | ||||||
| </TestCommand> | ||||||
| <TestCommand>$(TestCommand.Replace($([System.Environment]::NewLine), " "))</TestCommand> | ||||||
|
|
@@ -290,7 +296,9 @@ | |||||
|
|
||||||
| <!-- Run all Functional tests applicable to Unix. --> | ||||||
| <Target Name="RunFunctionalTestsUnix" Condition="'$(IsEnabledWindows)' != 'true'"> | ||||||
| <PropertyGroup> | ||||||
| <PropertyGroup> | ||||||
|
||||||
| <PropertyGroup> | |
| <PropertyGroup> |
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"
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"
Check failure on line 347 in build.proj
Azure Pipelines / PR-SqlClient-Project (Win22_Azure_Sql net8_0_AnyCPU_NativeSNI_3)
build.proj#L347
build.proj(347,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Debug -p:TargetnetcoreVersion=net8.0 -p:ReferenceType=Project -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category=flaky" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.
Check failure on line 347 in build.proj
Azure Pipelines / PR-SqlClient-Project (Win22_Azure_Sql net8_0_AnyCPU_NativeSNI_3)
build.proj#L347
build.proj(347,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Debug -p:TargetnetcoreVersion=net8.0 -p:ReferenceType=Project -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category=flaky" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.
Check failure on line 347 in build.proj
Azure Pipelines / PR-SqlClient-Package (Win22_Azure_Sql net9_0_AnyCPU_ManagedSNI_3)
build.proj#L347
build.proj(347,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Debug -p:TargetnetcoreVersion=net9.0 -p:ReferenceType=Package -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category=flaky" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.
Check failure on line 347 in build.proj
Azure Pipelines / PR-SqlClient-Project (Win11_Azure_Sql net9_0_AnyCPU_NativeSNI_3)
build.proj#L347
build.proj(347,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Debug -p:TargetnetcoreVersion=net9.0 -p:ReferenceType=Project -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category=flaky" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.
Check failure on line 347 in build.proj
Azure Pipelines / PR-SqlClient-Project (Win11_Azure_Sql net9_0_AnyCPU_ManagedSNI_3)
build.proj#L347
build.proj(347,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Debug -p:TargetnetcoreVersion=net9.0 -p:ReferenceType=Project -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category=flaky" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.
Check failure on line 347 in build.proj
Azure Pipelines / PR-SqlClient-Project (Win11_Azure_Sql net462_AnyCPU_3)
build.proj#L347
build.proj(347,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Debug -p:TargetnetfxVersion=net462 -p:ReferenceType=Project -p:TestSet=3 -p:TestTargetOS=Windowsnetfx --collect "Code coverage" --results-directory TestResults --filter "category=flaky" --logger:"trx;LogFilePrefix=Manual-Windowsnetfx-3" " exited with code 1.
Check failure on line 347 in build.proj
Azure Pipelines / PR-SqlClient-Project (Win22_Azure_Sql net9_0_AnyCPU_ManagedSNI_3)
build.proj#L347
build.proj(347,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Debug -p:TargetnetcoreVersion=net9.0 -p:ReferenceType=Project -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category!=failing&category!=flaky" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.
Check failure on line 347 in build.proj
Azure Pipelines / PR-SqlClient-Project (Win11_Azure_Sql net8_0_AnyCPU_NativeSNI_3)
build.proj#L347
build.proj(347,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Debug -p:TargetnetcoreVersion=net8.0 -p:ReferenceType=Project -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category!=failing&category!=flaky" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.
Check failure on line 347 in build.proj
Azure Pipelines / PR-SqlClient-Project
build.proj#L347
build.proj(347,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Debug -p:TargetnetcoreVersion=net8.0 -p:ReferenceType=Project -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category=flaky" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.
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"
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -73,12 +73,29 @@ steps: | |
| inputs: | ||
| 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"' | ||
|
||
|
|
||
| - task: DotNetCoreCLI@2 | ||
| displayName: 'Run Flaky Functional Tests for ${{parameters.TargetNetCoreVersion }}' | ||
| inputs: | ||
| 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=flaky"' | ||
| continueOnError: true | ||
|
|
||
| - task: DotNetCoreCLI@2 | ||
| displayName: 'Run Manual Tests for ${{parameters.TargetNetCoreVersion }}' | ||
| inputs: | ||
| 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"' | ||
|
||
| retryCountOnTaskFailure: ${{parameters.retryCountOnManualTests }} | ||
|
|
||
| - task: DotNetCoreCLI@2 | ||
| displayName: 'Run Flaky Manual Tests for ${{parameters.TargetNetCoreVersion }}' | ||
| inputs: | ||
| 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=flaky" --collect "Code Coverage"' | ||
| retryCountOnTaskFailure: ${{parameters.retryCountOnManualTests }} | ||
| continueOnError: true | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -72,12 +72,29 @@ steps: | |
| inputs: | ||
| 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"' | ||
|
||
|
|
||
| - task: DotNetCoreCLI@2 | ||
| displayName: 'Run Flaky Functional Tests for ${{parameters.TargetNetFxVersion }}' | ||
| inputs: | ||
| 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=flaky" --collect "Code Coverage"' | ||
| continueOnError: true | ||
|
|
||
| - task: DotNetCoreCLI@2 | ||
| displayName: 'Run Manual Tests for ${{parameters.TargetNetFxVersion }}' | ||
| inputs: | ||
| 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"' | ||
|
||
| retryCountOnTaskFailure: ${{parameters.retryCountOnManualTests }} | ||
|
|
||
| - task: DotNetCoreCLI@2 | ||
| displayName: 'Run Flaky Manual Tests for ${{parameters.TargetNetFxVersion }}' | ||
| inputs: | ||
| 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=flaky" --collect "Code Coverage"' | ||
| retryCountOnTaskFailure: ${{parameters.retryCountOnManualTests }} | ||
| continueOnError: true | ||
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"