From 788023fea5fbf2a8a67ba82764592b3b4bbd9746 Mon Sep 17 00:00:00 2001 From: Curtis Wensley Date: Fri, 24 Jan 2025 15:55:28 -0800 Subject: [PATCH] Don't when running tests with the test app --- test/Eto.Test/UnitTests/TestBase.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/Eto.Test/UnitTests/TestBase.cs b/test/Eto.Test/UnitTests/TestBase.cs index 9646dd4e5..51b5c2044 100755 --- a/test/Eto.Test/UnitTests/TestBase.cs +++ b/test/Eto.Test/UnitTests/TestBase.cs @@ -61,6 +61,7 @@ public override TestResult Execute(TestExecutionContext context) public class EtoTestSetup { static bool _quit; + static bool _appWasCreated; /// /// Timeout for application initialization @@ -157,6 +158,8 @@ public static void Initialize() thread.Start(); if (!ev.WaitOne(ApplicationTimeout)) Assert.Fail("Could not initialize application"); + + _appWasCreated = true; if (exception != null) ExceptionDispatchInfo.Capture(exception).Throw(); } @@ -173,6 +176,8 @@ public void GlobalSetup() public void GlobalTeardown() { _quit = true; + if (!_appWasCreated) + return; Application.Instance?.AsyncInvoke(() => { Application.Instance?.Quit();