Skip to content

Commit 5f26302

Browse files
authored
Quarantining CanDispatchAsyncWorkToSyncContext (#22803)
* Quarantining CanDispatchAsyncWorkToSyncContext * Missing using * Make method virtual
1 parent 949b5e0 commit 5f26302

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/Components/test/E2ETest/ServerExecutionTests/ServerComponentRenderingTest.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using Microsoft.AspNetCore.Components.E2ETest.Infrastructure.ServerFixtures;
77
using Microsoft.AspNetCore.Components.E2ETest.Tests;
88
using Microsoft.AspNetCore.E2ETesting;
9+
using Microsoft.AspNetCore.Testing;
910
using OpenQA.Selenium;
1011
using OpenQA.Selenium.Support.UI;
1112
using Xunit;
@@ -35,5 +36,10 @@ public void ThrowsIfRenderIsRequestedOutsideSyncContext()
3536
$"{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.",
3637
() => result.Text);
3738
}
39+
40+
[Fact]
41+
[Flaky("https://github.com/dotnet/aspnetcore-internal/issues/3615", FlakyOn.Helix.All)]
42+
public override void CanDispatchAsyncWorkToSyncContext()
43+
=> base.CanDispatchAsyncWorkToSyncContext();
3844
}
3945
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ public void CanDoubleDispatchRenderToSyncContext()
578578
}
579579

580580
[Fact]
581-
public void CanDispatchAsyncWorkToSyncContext()
581+
public virtual void CanDispatchAsyncWorkToSyncContext()
582582
{
583583
var appElement = Browser.MountTestComponent<DispatchingComponent>();
584584
var result = appElement.FindElement(By.Id("result"));

0 commit comments

Comments
 (0)