From a95abdb564e77a3633876b9d04e322334b4d74b6 Mon Sep 17 00:00:00 2001 From: Doug Bunting <6431421+dougbu@users.noreply.github.com> Date: Tue, 25 Aug 2020 16:06:07 -0700 Subject: [PATCH] !temporary! Add `[Repeat]` attributes for all re-enabled tests - double-check none wer skipped for flakiness --- .../test/E2ETest/Tests/WebAssemblyStringComparisonTest.cs | 2 ++ .../test/MusicStore.Test/ShoppingCartControllerTest.cs | 4 ++++ src/Mvc/test/Mvc.FunctionalTests/RazorPagesTest.cs | 1 + .../Mvc.FunctionalTests/SystemTextJsonInputFormatterTest.cs | 2 ++ .../Mvc.IntegrationTests/ComplexTypeIntegrationTestBase.cs | 2 ++ .../KeyValuePairModelBinderIntegrationTest.cs | 3 +++ src/ProjectTemplates/test/EmptyWebTemplateTest.cs | 1 + src/ProjectTemplates/test/MvcTemplateTest.cs | 1 + src/ProjectTemplates/test/WebApiTemplateTest.cs | 1 + src/ProjectTemplates/test/WorkerTemplateTest.cs | 2 ++ .../ApplicationPartDiscoveryIntegrationTest.cs | 1 + .../IdentityExternalClaimsTests.cs | 2 ++ .../IIS/IIS/test/Common.FunctionalTests/AppOfflineTests.cs | 1 + .../Common.FunctionalTests/Inprocess/ClientDisconnectTests.cs | 1 + .../Kestrel/test/Interop.FunctionalTests/ChromeTests.cs | 1 + 15 files changed, 25 insertions(+) diff --git a/src/Components/test/E2ETest/Tests/WebAssemblyStringComparisonTest.cs b/src/Components/test/E2ETest/Tests/WebAssemblyStringComparisonTest.cs index 9a3826840345..24dca31cac79 100644 --- a/src/Components/test/E2ETest/Tests/WebAssemblyStringComparisonTest.cs +++ b/src/Components/test/E2ETest/Tests/WebAssemblyStringComparisonTest.cs @@ -5,6 +5,7 @@ using Microsoft.AspNetCore.Components.E2ETest.Infrastructure; using Microsoft.AspNetCore.Components.E2ETest.Infrastructure.ServerFixtures; using Microsoft.AspNetCore.E2ETesting; +using Microsoft.AspNetCore.Testing; using OpenQA.Selenium; using Xunit; using Xunit.Abstractions; @@ -22,6 +23,7 @@ public WebAssemblyStringComparisonTest( } [Fact] + [Repeat] public void InvariantCultureWorksAsExpected() { Navigate(ServerPathBase, noReload: false); diff --git a/src/MusicStore/test/MusicStore.Test/ShoppingCartControllerTest.cs b/src/MusicStore/test/MusicStore.Test/ShoppingCartControllerTest.cs index 69628ea9ee71..b01d78739612 100644 --- a/src/MusicStore/test/MusicStore.Test/ShoppingCartControllerTest.cs +++ b/src/MusicStore/test/MusicStore.Test/ShoppingCartControllerTest.cs @@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Features; using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Testing; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Primitives; @@ -78,6 +79,7 @@ public async Task Index_ReturnsNoCartItems_WhenNoItemsInCart() } [Fact] + [Repeat] public async Task Index_ReturnsCartItems_WhenItemsInCart() { // Arrange @@ -114,6 +116,7 @@ public async Task Index_ReturnsCartItems_WhenItemsInCart() } [Fact] + [Repeat] public async Task AddToCart_AddsItemToCart() { // Arrange @@ -156,6 +159,7 @@ public async Task AddToCart_AddsItemToCart() } [Fact] + [Repeat] public async Task RemoveFromCart_RemovesItemFromCart() { // Arrange diff --git a/src/Mvc/test/Mvc.FunctionalTests/RazorPagesTest.cs b/src/Mvc/test/Mvc.FunctionalTests/RazorPagesTest.cs index c24243bc16eb..5e1d1af24a35 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/RazorPagesTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/RazorPagesTest.cs @@ -805,6 +805,7 @@ public async Task PolymorphicPropertiesOnPageModelsAreBound() } [Fact] + [Repeat] public async Task PolymorphicPropertiesOnPageModelsAreValidated() { // Arrange diff --git a/src/Mvc/test/Mvc.FunctionalTests/SystemTextJsonInputFormatterTest.cs b/src/Mvc/test/Mvc.FunctionalTests/SystemTextJsonInputFormatterTest.cs index cdb8498e3356..a97fff83aee8 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/SystemTextJsonInputFormatterTest.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/SystemTextJsonInputFormatterTest.cs @@ -2,10 +2,12 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Threading.Tasks; +using Microsoft.AspNetCore.Testing; using Xunit; namespace Microsoft.AspNetCore.Mvc.FunctionalTests { + [Repeat] public class SystemTextJsonInputFormatterTest : JsonInputFormatterTestBase { public SystemTextJsonInputFormatterTest(MvcTestFixture fixture) diff --git a/src/Mvc/test/Mvc.IntegrationTests/ComplexTypeIntegrationTestBase.cs b/src/Mvc/test/Mvc.IntegrationTests/ComplexTypeIntegrationTestBase.cs index a6285e76e9b4..979303f97d1e 100644 --- a/src/Mvc/test/Mvc.IntegrationTests/ComplexTypeIntegrationTestBase.cs +++ b/src/Mvc/test/Mvc.IntegrationTests/ComplexTypeIntegrationTestBase.cs @@ -1853,6 +1853,7 @@ public async Task ComplexBinder_BindsKeyValuePairProperty_EmptyPrefix_Success() } [Fact] + [Repeat] public async Task ComplexBinder_BindsKeyValuePairProperty_NoCollectionData() { // Arrange @@ -1902,6 +1903,7 @@ public async Task ComplexBinder_BindsKeyValuePairProperty_NoCollectionData() } [Fact] + [Repeat] public async Task ComplexBinder_BindsKeyValuePairProperty_NoData() { // Arrange diff --git a/src/Mvc/test/Mvc.IntegrationTests/KeyValuePairModelBinderIntegrationTest.cs b/src/Mvc/test/Mvc.IntegrationTests/KeyValuePairModelBinderIntegrationTest.cs index 974cce8bf0f6..66f9c4de90a0 100644 --- a/src/Mvc/test/Mvc.IntegrationTests/KeyValuePairModelBinderIntegrationTest.cs +++ b/src/Mvc/test/Mvc.IntegrationTests/KeyValuePairModelBinderIntegrationTest.cs @@ -6,6 +6,7 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.ModelBinding; +using Microsoft.AspNetCore.Testing; using Xunit; namespace Microsoft.AspNetCore.Mvc.IntegrationTests @@ -312,6 +313,7 @@ public async Task KeyValuePairModelBinder_BindsKeyValuePairOfSimpleType_EmptyPre } [Fact] + [Repeat] public async Task KeyValuePairModelBinder_BindsKeyValuePairOfSimpleType_NoData() { // Arrange @@ -477,6 +479,7 @@ public async Task KeyValuePairModelBinder_BindsKeyValuePairOfComplexType_EmptyPr } [Fact] + [Repeat] public async Task KeyValuePairModelBinder_BindsKeyValuePairOfComplexType_NoData() { // Arrange diff --git a/src/ProjectTemplates/test/EmptyWebTemplateTest.cs b/src/ProjectTemplates/test/EmptyWebTemplateTest.cs index 4042b916312e..e38f961a5e67 100644 --- a/src/ProjectTemplates/test/EmptyWebTemplateTest.cs +++ b/src/ProjectTemplates/test/EmptyWebTemplateTest.cs @@ -32,6 +32,7 @@ public async Task EmptyWebTemplateCSharp() [ConditionalFact] [SkipOnHelix("Cert failures", Queues = "OSX.1014.Amd64;OSX.1014.Amd64.Open")] + [Repeat] public async Task EmptyWebTemplateFSharp() { await EmtpyTemplateCore("F#"); diff --git a/src/ProjectTemplates/test/MvcTemplateTest.cs b/src/ProjectTemplates/test/MvcTemplateTest.cs index febfb230103f..c383347e7d26 100644 --- a/src/ProjectTemplates/test/MvcTemplateTest.cs +++ b/src/ProjectTemplates/test/MvcTemplateTest.cs @@ -28,6 +28,7 @@ public MvcTemplateTest(ProjectFactoryFixture projectFactory, ITestOutputHelper o [ConditionalFact] [SkipOnHelix("cert failure", Queues = "OSX.1014.Amd64;OSX.1014.Amd64.Open")] + [Repeat] public async Task MvcTemplate_NoAuthFSharp() => await MvcTemplateCore(languageOverride: "F#"); [ConditionalFact] diff --git a/src/ProjectTemplates/test/WebApiTemplateTest.cs b/src/ProjectTemplates/test/WebApiTemplateTest.cs index fb66d3403a47..54634ccbbb14 100644 --- a/src/ProjectTemplates/test/WebApiTemplateTest.cs +++ b/src/ProjectTemplates/test/WebApiTemplateTest.cs @@ -34,6 +34,7 @@ public WebApiTemplateTest(ProjectFactoryFixture factoryFixture, ITestOutputHelpe [ConditionalFact] [SkipOnHelix("Cert failures", Queues = "OSX.1014.Amd64;OSX.1014.Amd64.Open")] + [Repeat] public Task WebApiTemplateFSharp() => WebApiTemplateCore(languageOverride: "F#"); [ConditionalFact] diff --git a/src/ProjectTemplates/test/WorkerTemplateTest.cs b/src/ProjectTemplates/test/WorkerTemplateTest.cs index f488b7597676..627c0ae4d7c7 100644 --- a/src/ProjectTemplates/test/WorkerTemplateTest.cs +++ b/src/ProjectTemplates/test/WorkerTemplateTest.cs @@ -2,6 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Threading.Tasks; +using Microsoft.AspNetCore.Testing; using Templates.Test.Helpers; using Xunit; using Xunit.Abstractions; @@ -23,6 +24,7 @@ public WorkerTemplateTest(ProjectFactoryFixture projectFactory, ITestOutputHelpe [Theory] [InlineData("C#")] [InlineData("F#")] + [Repeat] public async Task WorkerTemplateAsync(string language) { Project = await ProjectFactory.GetOrCreateProject( diff --git a/src/Razor/Microsoft.NET.Sdk.Razor/integrationtests/ApplicationPartDiscoveryIntegrationTest.cs b/src/Razor/Microsoft.NET.Sdk.Razor/integrationtests/ApplicationPartDiscoveryIntegrationTest.cs index f258b6eaa109..ff1fc8430024 100644 --- a/src/Razor/Microsoft.NET.Sdk.Razor/integrationtests/ApplicationPartDiscoveryIntegrationTest.cs +++ b/src/Razor/Microsoft.NET.Sdk.Razor/integrationtests/ApplicationPartDiscoveryIntegrationTest.cs @@ -23,6 +23,7 @@ public Task Build_ProjectWithDependencyThatReferencesMvc_AddsAttribute_WhenBuild [ConditionalFact] [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] [InitializeTestProject("AppWithP2PReference", additionalProjects: "ClassLibrary")] + [Repeat] public Task Build_ProjectWithDependencyThatReferencesMvc_AddsAttribute_WhenBuildingUsingDesktopMsbuild() => Build_ProjectWithDependencyThatReferencesMvc_AddsAttribute(MSBuildProcessKind.Desktop); diff --git a/src/Security/test/AuthSamples.FunctionalTests/IdentityExternalClaimsTests.cs b/src/Security/test/AuthSamples.FunctionalTests/IdentityExternalClaimsTests.cs index e91874ac061a..3daf654daed0 100644 --- a/src/Security/test/AuthSamples.FunctionalTests/IdentityExternalClaimsTests.cs +++ b/src/Security/test/AuthSamples.FunctionalTests/IdentityExternalClaimsTests.cs @@ -5,6 +5,7 @@ using System.Net.Http; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Testing; +using Microsoft.AspNetCore.Testing; using Xunit; namespace AuthSamples.FunctionalTests @@ -30,6 +31,7 @@ public async Task DefaultReturns200() } [Fact] + [Repeat] public async Task MyClaimsRedirectsToLoginPageWhenNotLoggedIn() { // Arrange & Act diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/AppOfflineTests.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/AppOfflineTests.cs index 4e1e83c4b42e..929955f89667 100644 --- a/src/Servers/IIS/IIS/test/Common.FunctionalTests/AppOfflineTests.cs +++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/AppOfflineTests.cs @@ -78,6 +78,7 @@ public async Task AppOfflineDroppedWhileSiteFailedToStartInShim_AppOfflineServed } [ConditionalFact] + [Repeat] public async Task AppOfflineDroppedWhileSiteFailedToStartInRequestHandler_SiteStops_InProcess() { var deploymentResult = await DeployApp(HostingModel.InProcess); diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/Inprocess/ClientDisconnectTests.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/Inprocess/ClientDisconnectTests.cs index 4026166b593d..fc99674e8d57 100644 --- a/src/Servers/IIS/IIS/test/Common.FunctionalTests/Inprocess/ClientDisconnectTests.cs +++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/Inprocess/ClientDisconnectTests.cs @@ -67,6 +67,7 @@ await connection.Send( } [ConditionalFact] + [Repeat] public async Task ClientDisconnectCallbackStress() { // Fixture initialization fails if inside of the Task.Run, so send an diff --git a/src/Servers/Kestrel/test/Interop.FunctionalTests/ChromeTests.cs b/src/Servers/Kestrel/test/Interop.FunctionalTests/ChromeTests.cs index 70ceb83c116c..85cd528b3f09 100644 --- a/src/Servers/Kestrel/test/Interop.FunctionalTests/ChromeTests.cs +++ b/src/Servers/Kestrel/test/Interop.FunctionalTests/ChromeTests.cs @@ -68,6 +68,7 @@ private void InitializeArgs() [MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win81, SkipReason = "Missing Windows ALPN support: https://en.wikipedia.org/wiki/Application-Layer_Protocol_Negotiation#Support")] [InlineData("", "Interop HTTP/2 GET")] [InlineData("?TestMethod=POST", "Interop HTTP/2 POST")] + [Repeat] public async Task Http2(string requestSuffix, string expectedResponse) { InitializeArgs();