diff --git a/ILSpy.Tests/Editor/FoldingContextMenuTests.cs b/ILSpy.Tests/Editor/FoldingContextMenuTests.cs index fa66ee433..b8d19a159 100644 --- a/ILSpy.Tests/Editor/FoldingContextMenuTests.cs +++ b/ILSpy.Tests/Editor/FoldingContextMenuTests.cs @@ -44,8 +44,11 @@ public class FoldingContextMenuTests // them all, then expand them all on a second invocation -- via DecompilerTextView.ToggleAllFoldings. var (window, vm) = await TestHarness.BootAsync(3); - var typeNode = vm.AssemblyTreeModel.FindNode( - "System.Linq", "System.Linq", "System.Linq.Enumerable"); + // A small CoreLib type still yields brace foldings (one per method body) but decompiles fast + // enough for the headless 15s wait on slow CI runners; a full System.Linq.Enumerable decompile + // does not. + var coreLibName = typeof(object).Assembly.GetName().Name!; + var typeNode = vm.AssemblyTreeModel.FindNode(coreLibName, "System", "System.Object"); vm.AssemblyTreeModel.SelectNode(typeNode); await vm.DockWorkspace.WaitForDecompiledTextAsync(); diff --git a/ILSpy.Tests/Metadata/GoToTokenHistoryTests.cs b/ILSpy.Tests/Metadata/GoToTokenHistoryTests.cs index ae62b33d2..202635c46 100644 --- a/ILSpy.Tests/Metadata/GoToTokenHistoryTests.cs +++ b/ILSpy.Tests/Metadata/GoToTokenHistoryTests.cs @@ -46,8 +46,11 @@ public class GoToTokenHistoryTests var ws = vm.DockWorkspace; // Start somewhere concrete: a decompiled type. This becomes the entry Back should return to. - var startNode = vm.AssemblyTreeModel.FindNode( - "System.Linq", "System.Linq", "System.Linq.Enumerable"); + // A small CoreLib type keeps the decompile inside the headless 15s wait on slow CI runners + // (a full System.Linq.Enumerable decompile overruns it); the token jump below lands on the + // metadata table, a distinct node either way. + var coreLibName = typeof(object).Assembly.GetName().Name!; + var startNode = vm.AssemblyTreeModel.FindNode(coreLibName, "System", "System.Object"); Assert.That(startNode, Is.Not.Null); vm.AssemblyTreeModel.SelectNode(startNode); await ws.WaitForDecompiledTextAsync(); diff --git a/ILSpy.Tests/Waiters.cs b/ILSpy.Tests/Waiters.cs index 977c17156..e8c396826 100644 --- a/ILSpy.Tests/Waiters.cs +++ b/ILSpy.Tests/Waiters.cs @@ -34,7 +34,10 @@ namespace ICSharpCode.ILSpy.Tests; public static class Waiters { - static readonly TimeSpan DefaultTimeout = TimeSpan.FromSeconds(15); + // Generous so the slow Windows CI runner can finish a cold first decompile (JIT + building a + // CoreLib-scale type system) or a large/whole-assembly decompile. A fast machine completes well + // under this and never waits the full window; only a genuine hang pays the price. + static readonly TimeSpan DefaultTimeout = TimeSpan.FromSeconds(60); static readonly TimeSpan PollInterval = TimeSpan.FromMilliseconds(25); public static async Task WaitForAsync(