Skip to content

Commit

Permalink
Don't when running tests with the test app
Browse files Browse the repository at this point in the history
  • Loading branch information
cwensley committed Jan 24, 2025
1 parent 3c810ee commit 788023f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/Eto.Test/UnitTests/TestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public override TestResult Execute(TestExecutionContext context)
public class EtoTestSetup
{
static bool _quit;
static bool _appWasCreated;

/// <summary>
/// Timeout for application initialization
Expand Down Expand Up @@ -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();
}
Expand All @@ -173,6 +176,8 @@ public void GlobalSetup()
public void GlobalTeardown()
{
_quit = true;
if (!_appWasCreated)
return;
Application.Instance?.AsyncInvoke(() =>
{
Application.Instance?.Quit();
Expand Down

0 comments on commit 788023f

Please sign in to comment.