mirror of https://github.com/icsharpcode/ILSpy.git
Browse Source
A test that triggers a decompile spawns a Task.Run plus dispatcher continuations and rarely awaits them; the per-test ResetAppState closed windows and drained the dispatcher but never cancelled the background work, so a continuation could land during the next test and read the swapped-in AppComposition.Current -- the dominant source of order-dependent flakiness (a different test tipped each run). Give DecompilerTabPageModel an internal CancelPendingAsync (store the in-flight decompile task, cancel its CTS, return it) and DockWorkspace a CancelPendingOperationsAsync that fans that across every document tab -- both legitimate shutdown hygiene too. ResetAppState.AfterTest now cancels and pumps the dispatcher until the work unwinds before the next test boots. This stops the random rotation of the failing test (the victims are now stable and diagnosable); two order-dependent failures remain (About-tab duplication and a nested-namespace tree race) that need their own fixes -- they still pass in isolation.pull/3755/head
3 changed files with 72 additions and 2 deletions
Loading…
Reference in new issue