From 534b9673cd6c056fdc056cbb838516e14266b630 Mon Sep 17 00:00:00 2001 From: Davide Giacometti Date: Thu, 9 Nov 2023 13:22:35 +0100 Subject: [PATCH] [Tests]Increase WebView2 loading timeout (#29760) --- .../MarkdownPreviewHandlerTest.cs | 2 +- .../UnitTests-SvgPreviewHandler/SvgPreviewControlTests.cs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/modules/previewpane/UnitTests-MarkdownPreviewHandler/MarkdownPreviewHandlerTest.cs b/src/modules/previewpane/UnitTests-MarkdownPreviewHandler/MarkdownPreviewHandlerTest.cs index 33dfeb29cc..773bfe65b4 100644 --- a/src/modules/previewpane/UnitTests-MarkdownPreviewHandler/MarkdownPreviewHandlerTest.cs +++ b/src/modules/previewpane/UnitTests-MarkdownPreviewHandler/MarkdownPreviewHandlerTest.cs @@ -17,7 +17,7 @@ namespace MarkdownPreviewHandlerUnitTests public class MarkdownPreviewHandlerTest { // A long timeout is needed. WebView2 can take a long time to load the first time in some CI systems. - private static readonly int HardTimeoutInMilliseconds = 30000; + private static readonly int HardTimeoutInMilliseconds = 60000; private static readonly int SleepTimeInMilliseconds = 200; [TestMethod] diff --git a/src/modules/previewpane/UnitTests-SvgPreviewHandler/SvgPreviewControlTests.cs b/src/modules/previewpane/UnitTests-SvgPreviewHandler/SvgPreviewControlTests.cs index d6a6f911ff..2636970e31 100644 --- a/src/modules/previewpane/UnitTests-SvgPreviewHandler/SvgPreviewControlTests.cs +++ b/src/modules/previewpane/UnitTests-SvgPreviewHandler/SvgPreviewControlTests.cs @@ -4,9 +4,7 @@ using System; using System.Drawing; -using System.Runtime.InteropServices; using System.Runtime.InteropServices.ComTypes; -using System.Text; using System.Threading; using System.Windows.Forms; using Microsoft.PowerToys.PreviewHandler.Svg; @@ -22,7 +20,7 @@ namespace SvgPreviewHandlerUnitTests public class SvgPreviewControlTests { // A long timeout is needed. WebView2 can take a long time to load the first time in some CI systems. - private static readonly int HardTimeoutInMilliseconds = 30000; + private static readonly int HardTimeoutInMilliseconds = 60000; private static readonly int SleepTimeInMilliseconds = 200; [TestMethod]