Quarantining CanDispatchAsyncWorkToSyncContext (#22803)

* Quarantining CanDispatchAsyncWorkToSyncContext

* Missing using

* Make method virtual
This commit is contained in:
Sébastien Ros 2020-06-11 09:30:26 -07:00 committed by GitHub
parent 949b5e0fcb
commit 5f26302eaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -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();
}
}

View File

@ -578,7 +578,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.Tests
}
[Fact]
public void CanDispatchAsyncWorkToSyncContext()
public virtual void CanDispatchAsyncWorkToSyncContext()
{
var appElement = Browser.MountTestComponent<DispatchingComponent>();
var result = appElement.FindElement(By.Id("result"));