From 7719e11c5784e879ca0b2edb298ae2e26ca58b02 Mon Sep 17 00:00:00 2001 From: Martin Zikmund Date: Wed, 14 Dec 2022 14:56:58 +0100 Subject: [PATCH] fix: Increase HighMemoryThreshold for Samples app --- src/SamplesApp/SamplesApp.Shared/App.xaml.cs | 3 +++ .../Tests/Windows_UI_Xaml_Controls/Given_ComboBox.cs | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/src/SamplesApp/SamplesApp.Shared/App.xaml.cs b/src/SamplesApp/SamplesApp.Shared/App.xaml.cs index a8fba1100e09..96509f2620fc 100644 --- a/src/SamplesApp/SamplesApp.Shared/App.xaml.cs +++ b/src/SamplesApp/SamplesApp.Shared/App.xaml.cs @@ -506,6 +506,9 @@ static void ConfigureFeatureFlags() #if __SKIA__ Uno.UI.FeatureConfiguration.ToolTip.UseToolTips = true; #endif + + // Allow template pool to work under higher memory load for CI. + FrameworkTemplatePool.HighMemoryThreshold = 0.9f; } diff --git a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_ComboBox.cs b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_ComboBox.cs index bf285d8299c6..3ef8d52ad352 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_ComboBox.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_ComboBox.cs @@ -132,6 +132,11 @@ public async Task When_ComboBox_Constrained_By_Parent() } } + /// + /// This test is memory sensitive - if the memory usage exceeds FrameworkTemplatePool.HighMemoryThreshold, + /// the test will most likely faily as the template will be recycled. Currently the Samples app uses + /// HighMemoryThreshold of 0.9 (see App.ConfigureFeatureFlags). + /// [TestMethod] #if __MACOS__ [Ignore("Currently fails on macOS, part of #9282 epic")]