Skip to content

Commit 56fb4b4

Browse files
Rename Flaky attribute (dotnet#19469)
1 parent cda7626 commit 56fb4b4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+209
-382
lines changed

.azure/pipelines/ci.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -499,15 +499,15 @@ stages:
499499
- powershell: "& ./src/Servers/IIS/tools/UpdateIISExpressCertificate.ps1; & ./src/Servers/IIS/tools/update_schema.ps1"
500500
displayName: Setup IISExpress test certificates and schema
501501
afterBuild:
502-
- powershell: "& ./build.ps1 -CI -NoBuild -Test /p:RunFlakyTests=true"
503-
displayName: Run Flaky Tests
502+
- powershell: "& ./build.ps1 -CI -NoBuild -Test /p:RunQuarantinedTests=true"
503+
displayName: Run Quarantined Tests
504504
continueOnError: true
505505
- task: PublishTestResults@2
506-
displayName: Publish Flaky Test Results
506+
displayName: Publish Quarantined Test Results
507507
inputs:
508508
testResultsFormat: 'xUnit'
509509
testResultsFiles: '*.xml'
510-
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/Flaky'
510+
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/Quarantined'
511511
artifacts:
512512
- name: Windows_Test_Dumps
513513
path: artifacts/dumps/
@@ -574,15 +574,15 @@ stages:
574574
displayName: Pack Packages (for Template tests)
575575
- bash: ./src/ProjectTemplates/build.sh --ci --pack --no-restore --no-build-deps "/bl:artifacts/log/template.pack.binlog"
576576
displayName: Pack Templates (for Template tests)
577-
- bash: ./build.sh --no-build --ci --test -p:RunFlakyTests=true
578-
displayName: Run Flaky Tests
577+
- bash: ./build.sh --no-build --ci --test -p:RunQuarantinedTests=true
578+
displayName: Run Quarantined Tests
579579
continueOnError: true
580580
- task: PublishTestResults@2
581-
displayName: Publish Flaky Test Results
581+
displayName: Publish Quarantined Test Results
582582
inputs:
583583
testResultsFormat: 'xUnit'
584584
testResultsFiles: '*.xml'
585-
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/Flaky'
585+
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/Quarantined'
586586
artifacts:
587587
- name: MacOS_Test_Logs
588588
path: artifacts/log/
@@ -611,15 +611,15 @@ stages:
611611
displayName: Pack Packages (for Template tests)
612612
- bash: ./src/ProjectTemplates/build.sh --ci --pack --no-restore --no-build-deps "/bl:artifacts/log/template.pack.binlog"
613613
displayName: Pack Templates (for Template tests)
614-
- bash: ./build.sh --no-build --ci --test -p:RunFlakyTests=true
615-
displayName: Run Flaky Tests
614+
- bash: ./build.sh --no-build --ci --test -p:RunQuarantinedTests=true
615+
displayName: Run Quarantined Tests
616616
continueOnError: true
617617
- task: PublishTestResults@2
618-
displayName: Publish Flaky Test Results
618+
displayName: Publish Quarantined Test Results
619619
inputs:
620620
testResultsFormat: 'xUnit'
621621
testResultsFiles: '*.xml'
622-
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/Flaky'
622+
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/Quarantined'
623623
artifacts:
624624
- name: Linux_Test_Logs
625625
path: artifacts/log/

Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@
3535
<DisableImplicitComponentsAnalyzers>true</DisableImplicitComponentsAnalyzers>
3636
</PropertyGroup>
3737

38-
<Import Project="eng\FlakyTests.BeforeArcade.props" />
38+
<Import Project="eng\QuarantinedTests.BeforeArcade.props" />
3939
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
40-
<Import Project="eng\FlakyTests.AfterArcade.props" />
40+
<Import Project="eng\QuarantinedTests.AfterArcade.props" />
4141

4242
<PropertyGroup>
4343
<Product>Microsoft ASP.NET Core</Product>

eng/FlakyTests.AfterArcade.props

Lines changed: 0 additions & 7 deletions
This file was deleted.

eng/FlakyTests.BeforeArcade.props

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<Project>
2+
<!-- Override where xUnit logs and results go if we're doing the Quarantined run -->
3+
<PropertyGroup Condition="'$(RunQuarantinedTests)' == 'true'">
4+
<ArtifactsLogDir>$(ArtifactsDir)log\$(Configuration)\Quarantined\</ArtifactsLogDir>
5+
<ArtifactsTestResultsDir>$(ArtifactsDir)TestResults\$(Configuration)\Quarantined\</ArtifactsTestResultsDir>
6+
</PropertyGroup>
7+
</Project>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<Project>
2+
<PropertyGroup>
3+
<_QuarantinedTestRunAdditionalArgs>-trait "Quarantined=true"</_QuarantinedTestRunAdditionalArgs>
4+
<_NonQuarantinedTestRunAdditionalArgs>-notrait "Quarantined=true"</_NonQuarantinedTestRunAdditionalArgs>
5+
</PropertyGroup>
6+
7+
<PropertyGroup>
8+
<TestRunnerAdditionalArguments Condition="'$(RunQuarantinedTests)' == ''">$(_NonQuarantinedTestRunAdditionalArgs) $(TestRunnerAdditionalArguments)</TestRunnerAdditionalArguments>
9+
<TestRunnerAdditionalArguments Condition="'$(RunQuarantinedTests)' == 'true'">$(_QuarantinedTestRunAdditionalArgs) $(TestRunnerAdditionalArguments)</TestRunnerAdditionalArguments>
10+
</PropertyGroup>
11+
</Project>

eng/helix/content/runtests.cmd

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,23 +53,21 @@ if %$quarantined%==True (
5353
set %$quarantined=true
5454
)
5555

56-
set NONQUARANTINE_FILTER="Flaky:All!=true&Flaky:Helix:All!=true&Flaky:Helix:Queue:All!=true&Flaky:Helix:Queue:%HELIX%!=true"
57-
set QUARANTINE_FILTER="Flaky:All=true|Flaky:Helix:All=true|Flaky:Helix:Queue:All=true|Flaky:Helix:Queue:%HELIX%=true"
56+
set NONQUARANTINE_FILTER="Quarantined!=true"
57+
set QUARANTINE_FILTER="Quarantined=true"
5858
if %$quarantined%==true (
5959
echo Running quarantined tests.
6060
%DOTNET_ROOT%\dotnet vstest %$target% --logger:xunit --TestCaseFilter:%QUARANTINE_FILTER%
6161
if errorlevel 1 (
62-
echo Failure in flaky test 1>&2
62+
echo Failure in quarantined test 1>&2
6363
REM DO NOT EXIT and DO NOT SET EXIT_CODE to 1
6464
)
6565
) else (
66-
REM We need to specify all possible Flaky filters that apply to this environment, because the flaky attribute
67-
REM only puts the explicit filter traits the user provided in
6866
REM Filter syntax: https://github.com/Microsoft/vstest-docs/blob/master/docs/filter.md
6967
echo Running non-quarantined tests.
7068
%DOTNET_ROOT%\dotnet vstest %$target% --logger:xunit --TestCaseFilter:%NONQUARANTINE_FILTER%
7169
if errorlevel 1 (
72-
echo Failure in non-flaky test 1>&2
70+
echo Failure in non-quarantined test 1>&2
7371
set exit_code=1
7472
REM DO NOT EXIT
7573
)

eng/helix/content/runtests.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,9 @@ fi
115115

116116
exit_code=0
117117

118-
# We need to specify all possible quarantined filters that apply to this environment, because the quarantine attribute
119-
# only puts the explicit filter traits the user provided in the flaky attribute
120118
# Filter syntax: https://github.com/Microsoft/vstest-docs/blob/master/docs/filter.md
121-
NONQUARANTINE_FILTER="Flaky:All!=true&Flaky:Helix:All!=true&Flaky:Helix:Queue:All!=true&Flaky:Helix:Queue:$helix_queue_name!=true"
122-
QUARANTINE_FILTER="Flaky:All=true|Flaky:Helix:All=true|Flaky:Helix:Queue:All=true|Flaky:Helix:Queue:$helix_queue_name=true"
119+
NONQUARANTINE_FILTER="Quarantined!=true"
120+
QUARANTINE_FILTER="Quarantined=true"
123121
if [ "$quarantined" == true ]; then
124122
echo "Running all tests including quarantined."
125123
$DOTNET_ROOT/dotnet vstest $test_binary_path --logger:xunit --TestCaseFilter:"$QUARANTINE_FILTER"

src/Components/test/E2ETest/Tests/EventTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public void PreventDefault_DotNotApplyByDefault()
167167
}
168168

169169
[Fact]
170-
[Flaky("https://github.com/dotnet/aspnetcore-internal/issues/1987", FlakyOn.AzP.Windows)]
170+
[QuarantinedTest("https://github.com/dotnet/aspnetcore-internal/issues/1987")]
171171
public void InputEvent_RespondsOnKeystrokes()
172172
{
173173
Browser.MountTestComponent<InputEventComponent>();

src/Identity/test/Identity.Test/IdentityUIScriptsTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public static IEnumerable<object[]> ScriptWithFallbackSrcData
7979

8080
[Theory]
8181
[MemberData(nameof(ScriptWithFallbackSrcData))]
82-
[Flaky("https://github.com/dotnet/aspnetcore-internal/issues/2267", FlakyOn.AzP.macOS)]
82+
[QuarantinedTest("https://github.com/dotnet/aspnetcore-internal/issues/2267")]
8383
public async Task IdentityUI_ScriptTags_FallbackSourceContent_Matches_CDNContent(ScriptTag scriptTag)
8484
{
8585
var wwwrootDir = Path.Combine(GetProjectBasePath(), "wwwroot", scriptTag.Version);

0 commit comments

Comments
 (0)