Browse Source
* Fix headless cleanup race: dispose before signalling TCS (#20664) Restructure DispatchCore<TResult> so application.Dispose() runs in a finally block before tcs.TrySet* is called. Previously, the using-var scope closed after TrySetResult, leaving s_uiThread set when the next non-headless test started. Adds a regression test in IsolationTests that verifies Dispatcher.UIThread is accessible from the calling thread immediately after a headless dispatch completes (PerTest isolation only). * Use Assert.SkipWhen in Dispatch_Cleanup_Should_Complete_Before_Task_Returns * Restrict Dispatch_Cleanup_Should_Complete_Before_Task_Returns to NUnit xUnit's AvaloniaFactDiscoverer wraps every [Fact] in session.Dispatch, so awaiting another session.Dispatch inside the test body deadlocks on the session's single background thread. * Remove new test It isn't reliable enough during CI. --------- Co-authored-by: Jumar Macato <16554748+jmacato@users.noreply.github.com>pull/21275/head
committed by
GitHub
1 changed files with 32 additions and 13 deletions
Loading…
Reference in new issue