From bea058511b1141a88c2251d4e723911f9ec54060 Mon Sep 17 00:00:00 2001 From: Adam Sitnik Date: Thu, 24 Dec 2020 14:56:08 +0100 Subject: [PATCH 1/2] the MainWindowTitle might have already been initialized --- src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs b/src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs index f270f518296791..55314fd53c9d6d 100644 --- a/src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs +++ b/src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs @@ -1603,8 +1603,6 @@ public void MainWindowTitle_GetWithGui_ShouldRefresh_Windows() { try { - Assert.Equal(string.Empty, process.MainWindowTitle); - for (int attempt = 0; attempt < 50; ++attempt) { process.Refresh(); From fa4e38c4ff6529f4ac56f67cbe9523aa82a3d864 Mon Sep 17 00:00:00 2001 From: Adam Sitnik Date: Thu, 24 Dec 2020 15:01:50 +0100 Subject: [PATCH 2/2] disable MainWindow*_GetWithGui_ShouldRefresh_Windows tests for Windows Server Core --- .../System.Diagnostics.Process/tests/ProcessTests.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs b/src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs index 55314fd53c9d6d..8efb40c1dc1332 100644 --- a/src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs +++ b/src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs @@ -1558,7 +1558,9 @@ public void MainWindowHandle_GetNotStarted_ThrowsInvalidOperationException() Assert.Throws(() => process.MainWindowHandle); } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // it needs Notepad + [ConditionalFact(typeof(PlatformDetection), + nameof(PlatformDetection.IsNotWindowsNanoServer), // it needs Notepad + nameof(PlatformDetection.IsNotWindowsServerCore))] // explained in https://github.com/dotnet/runtime/pull/44972 [OuterLoop("Pops UI")] [PlatformSpecific(TestPlatforms.Windows)] public void MainWindowHandle_GetWithGui_ShouldRefresh_Windows() @@ -1591,7 +1593,9 @@ public void MainWindowHandle_GetWithGui_ShouldRefresh_Windows() } } - [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // it needs Notepad + [ConditionalFact(typeof(PlatformDetection), + nameof(PlatformDetection.IsNotWindowsNanoServer), // it needs Notepad + nameof(PlatformDetection.IsNotWindowsServerCore))] // explained in https://github.com/dotnet/runtime/pull/44972 [OuterLoop("Pops UI")] [PlatformSpecific(TestPlatforms.Windows)] public void MainWindowTitle_GetWithGui_ShouldRefresh_Windows()