diff --git a/src/ProjectTemplates/BlazorTemplates.Tests/BlazorServerTemplateTest.cs b/src/ProjectTemplates/BlazorTemplates.Tests/BlazorServerTemplateTest.cs index 101cfda2103e..88548db7715b 100644 --- a/src/ProjectTemplates/BlazorTemplates.Tests/BlazorServerTemplateTest.cs +++ b/src/ProjectTemplates/BlazorTemplates.Tests/BlazorServerTemplateTest.cs @@ -16,6 +16,7 @@ namespace Templates.Test { + [Retry] public class BlazorServerTemplateTest : BlazorTemplateTest { public BlazorServerTemplateTest(ProjectFactoryFixture projectFactory) @@ -26,7 +27,6 @@ public BlazorServerTemplateTest(ProjectFactoryFixture projectFactory) public override string ProjectType { get; } = "blazorserver"; [Theory] - [Retry] [InlineData(BrowserKind.Chromium)] [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/30761")] public async Task BlazorServerTemplateWorks_NoAuth(BrowserKind browserKind) @@ -83,7 +83,6 @@ public async Task BlazorServerTemplateWorks_NoAuth(BrowserKind browserKind) BrowserManager.WithBrowsers(new[] { BrowserKind.Chromium }, true, false); [Theory] - [Retry] [MemberData(nameof(BlazorServerTemplateWorks_IndividualAuthData))] [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/30882")] [SkipOnHelix("https://github.com/dotnet/aspnetcore/issues/30825", Queues = "All.OSX")] @@ -174,7 +173,6 @@ private async Task TestBasicNavigation(Project project, IPage page) } [Theory] - [Retry] [InlineData("IndividualB2C", null)] [InlineData("IndividualB2C", new string[] { "--called-api-url \"https://graph.microsoft.com\"", "--called-api-scopes user.readwrite" })] [InlineData("SingleOrg", null)] diff --git a/src/ProjectTemplates/BlazorTemplates.Tests/BlazorWasmTemplateTest.cs b/src/ProjectTemplates/BlazorTemplates.Tests/BlazorWasmTemplateTest.cs index 7200f04822fb..76b1605b85bf 100644 --- a/src/ProjectTemplates/BlazorTemplates.Tests/BlazorWasmTemplateTest.cs +++ b/src/ProjectTemplates/BlazorTemplates.Tests/BlazorWasmTemplateTest.cs @@ -23,6 +23,7 @@ namespace Templates.Test { + [Retry] public class BlazorWasmTemplateTest : BlazorTemplateTest { public BlazorWasmTemplateTest(ProjectFactoryFixture projectFactory) @@ -31,7 +32,6 @@ public BlazorWasmTemplateTest(ProjectFactoryFixture projectFactory) public override string ProjectType { get; } = "blazorwasm"; [Theory] - [Retry] [InlineData(BrowserKind.Chromium)] [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/30882")] public async Task BlazorWasmStandaloneTemplate_Works(BrowserKind browserKind) @@ -69,7 +69,6 @@ private async Task NavigateToPage(IBrowserContext browser, string listeni } [Theory] - [Retry] [InlineData(BrowserKind.Chromium)] [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/30882")] public async Task BlazorWasmHostedTemplate_Works(BrowserKind browserKind) @@ -119,7 +118,6 @@ private static async Task AssertCompressionFormat(AspNetProcess aspNetProcess, s } [Theory] - [Retry] [InlineData(BrowserKind.Chromium)] [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/30882")] public async Task BlazorWasmStandalonePwaTemplate_Works(BrowserKind browserKind) @@ -156,7 +154,6 @@ public async Task BlazorWasmStandalonePwaTemplate_Works(BrowserKind browserKind) } [Theory] - [Retry] [InlineData(BrowserKind.Chromium)] [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/30882")] public async Task BlazorWasmHostedPwaTemplate_Works(BrowserKind browserKind) @@ -228,7 +225,6 @@ private void ValidatePublishedServiceWorker(Project project) } [ConditionalTheory] - [Retry] [InlineData(BrowserKind.Chromium)] // LocalDB doesn't work on non Windows platforms [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] @@ -239,7 +235,6 @@ public Task BlazorWasmHostedTemplate_IndividualAuth_Works_WithLocalDB(BrowserKin // This test depends on BlazorWasmTemplate_CreateBuildPublish_IndividualAuthNoLocalDb running first [Theory] - [Retry] [InlineData(BrowserKind.Chromium)] [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/30882")] [SkipOnHelix("https://github.com/dotnet/aspnetcore/issues/30825", Queues = "All.OSX")] @@ -325,7 +320,6 @@ private async Task BlazorWasmHostedTemplate_IndividualAuth_Works(BrowserKind bro } [Theory] - [Retry] [InlineData(BrowserKind.Chromium, Skip = "https://github.com/dotnet/aspnetcore/issues/28596")] public async Task BlazorWasmStandaloneTemplate_IndividualAuth_Works(BrowserKind browserKind) { @@ -425,7 +419,6 @@ public TemplateInstance(string name, params string[] arguments) } [Theory] - [Retry] [MemberData(nameof(TemplateData))] [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/30851")] public Task BlazorWasmHostedTemplate_AzureActiveDirectoryTemplate_Works(TemplateInstance instance) diff --git a/src/Testing/src/xunit/AspNetTestInvoker.cs b/src/Testing/src/xunit/AspNetTestInvoker.cs index 0d34db32f035..68c42a698626 100644 --- a/src/Testing/src/xunit/AspNetTestInvoker.cs +++ b/src/Testing/src/xunit/AspNetTestInvoker.cs @@ -81,6 +81,8 @@ protected async Task RetryAsync(RetryAttribute retryAttribute, object t } else if (attempts < retryAttribute.MaxRetries - 1) { + _testOutputHelper.WriteLine($"Retrying test, attempt {attempts} of {retryAttribute.MaxRetries} failed."); + await Task.Delay(5000); Aggregator.Clear(); } }