From f429746842b1eafb4f8c6b9660a5209bb7db635e Mon Sep 17 00:00:00 2001 From: David Date: Thu, 12 Dec 2024 11:43:20 -0500 Subject: [PATCH] test(hr): Prevent cross-tests impacts --- .../HotReload/Frame/HRApp/Tests/Given_TextBlock.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Uno.UI.RuntimeTests/Tests/HotReload/Frame/HRApp/Tests/Given_TextBlock.cs b/src/Uno.UI.RuntimeTests/Tests/HotReload/Frame/HRApp/Tests/Given_TextBlock.cs index c87b9915f418..c99eec807d83 100644 --- a/src/Uno.UI.RuntimeTests/Tests/HotReload/Frame/HRApp/Tests/Given_TextBlock.cs +++ b/src/Uno.UI.RuntimeTests/Tests/HotReload/Frame/HRApp/Tests/Given_TextBlock.cs @@ -121,7 +121,15 @@ public async Task When_Changing_TextBlock_UsingHRClient_NoChanges() true) .WithExtendedTimeouts(); // Required for CI - await hr.UpdateFileAsync(req, ct); + try + { + await hr.UpdateFileAsync(req, ct); + } + finally + { + // Make sure to undo to not impact other tests! + await hr.UpdateFileAsync(req.Undo(waitForHotReload: false), CancellationToken.None); + } } // Another version of the test above, but pausing the TypeMapping before calling the file update