From e9adcdfb46fffa2eaf5c81268fd0c362fc30e738 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Laban?= Date: Thu, 16 Jan 2025 11:22:14 -0500 Subject: [PATCH 1/2] test: Adjust When_Many_Targets_Collected (cherry picked from commit 92caa00f223e90f9bc766a7125d5c901362d8ad1) --- .../Tests/Windows_UI/Given_WeakEventHelper.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Uno.UI.RuntimeTests/Tests/Windows_UI/Given_WeakEventHelper.cs b/src/Uno.UI.RuntimeTests/Tests/Windows_UI/Given_WeakEventHelper.cs index cbba8d594fec..56e52e7b77c5 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Windows_UI/Given_WeakEventHelper.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Windows_UI/Given_WeakEventHelper.cs @@ -178,7 +178,7 @@ void Do() SUT.Invoke(this, null); - Assert.AreEqual(5150, invoked); + Assert.IsTrue(invoked > 5150); disposable.Clear(); @@ -188,7 +188,7 @@ void Do() // Ensure that everything has been collected. SUT.Invoke(this, null); - Assert.AreEqual(5150, invoked); + Assert.IsTrue(invoked > 5150); } [TestMethod] From 65702553135179fcc8e4e2d7d45c6de43ebaf6c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Laban?= Date: Thu, 16 Jan 2025 13:23:39 -0500 Subject: [PATCH 2/2] chore: Adjust condition (cherry picked from commit 639b2c71c44cdb012f1cc96b0bc8c228b689f3eb) --- .../Tests/Windows_UI/Given_WeakEventHelper.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Uno.UI.RuntimeTests/Tests/Windows_UI/Given_WeakEventHelper.cs b/src/Uno.UI.RuntimeTests/Tests/Windows_UI/Given_WeakEventHelper.cs index 56e52e7b77c5..9f18d28a3373 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Windows_UI/Given_WeakEventHelper.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Windows_UI/Given_WeakEventHelper.cs @@ -178,7 +178,7 @@ void Do() SUT.Invoke(this, null); - Assert.IsTrue(invoked > 5150); + Assert.IsTrue(invoked >= 5150); disposable.Clear(); @@ -188,7 +188,7 @@ void Do() // Ensure that everything has been collected. SUT.Invoke(this, null); - Assert.IsTrue(invoked > 5150); + Assert.IsTrue(invoked >= 5150); } [TestMethod]