From 5f26302eaa702fedd8f40a5839b7cff69b3e4713 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Ros?= Date: Thu, 11 Jun 2020 09:30:26 -0700 Subject: [PATCH] Quarantining CanDispatchAsyncWorkToSyncContext (#22803) * Quarantining CanDispatchAsyncWorkToSyncContext * Missing using * Make method virtual --- .../ServerExecutionTests/ServerComponentRenderingTest.cs | 6 ++++++ src/Components/test/E2ETest/Tests/ComponentRenderingTest.cs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Components/test/E2ETest/ServerExecutionTests/ServerComponentRenderingTest.cs b/src/Components/test/E2ETest/ServerExecutionTests/ServerComponentRenderingTest.cs index 25b7b552af..41d775c892 100644 --- a/src/Components/test/E2ETest/ServerExecutionTests/ServerComponentRenderingTest.cs +++ b/src/Components/test/E2ETest/ServerExecutionTests/ServerComponentRenderingTest.cs @@ -6,6 +6,7 @@ using BasicTestApp; using Microsoft.AspNetCore.Components.E2ETest.Infrastructure.ServerFixtures; using Microsoft.AspNetCore.Components.E2ETest.Tests; using Microsoft.AspNetCore.E2ETesting; +using Microsoft.AspNetCore.Testing; using OpenQA.Selenium; using OpenQA.Selenium.Support.UI; using Xunit; @@ -35,5 +36,10 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests $"{typeof(InvalidOperationException).FullName}: The current thread is not associated with the Dispatcher. Use InvokeAsync() to switch execution to the Dispatcher when triggering rendering or component state.", () => result.Text); } + + [Fact] + [Flaky("https://github.com/dotnet/aspnetcore-internal/issues/3615", FlakyOn.Helix.All)] + public override void CanDispatchAsyncWorkToSyncContext() + => base.CanDispatchAsyncWorkToSyncContext(); } } diff --git a/src/Components/test/E2ETest/Tests/ComponentRenderingTest.cs b/src/Components/test/E2ETest/Tests/ComponentRenderingTest.cs index fe5ce079a5..a2aed17d04 100644 --- a/src/Components/test/E2ETest/Tests/ComponentRenderingTest.cs +++ b/src/Components/test/E2ETest/Tests/ComponentRenderingTest.cs @@ -578,7 +578,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.Tests } [Fact] - public void CanDispatchAsyncWorkToSyncContext() + public virtual void CanDispatchAsyncWorkToSyncContext() { var appElement = Browser.MountTestComponent(); var result = appElement.FindElement(By.Id("result"));