Skip to content

Commit

Permalink
disable MainWindow*_GetWithGui_ShouldRefresh_Windows tests for Window…
Browse files Browse the repository at this point in the history
…s Server Core (#46387)

* the MainWindowTitle might have already been initialized

* disable MainWindow*_GetWithGui_ShouldRefresh_Windows tests for Windows Server Core
  • Loading branch information
adamsitnik authored Dec 24, 2020
1 parent 3ae36b5 commit 5808716
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1558,7 +1558,9 @@ public void MainWindowHandle_GetNotStarted_ThrowsInvalidOperationException()
Assert.Throws<InvalidOperationException>(() => 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()
Expand Down Expand Up @@ -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()
Expand All @@ -1603,8 +1607,6 @@ public void MainWindowTitle_GetWithGui_ShouldRefresh_Windows()
{
try
{
Assert.Equal(string.Empty, process.MainWindowTitle);

for (int attempt = 0; attempt < 50; ++attempt)
{
process.Refresh();
Expand Down

0 comments on commit 5808716

Please sign in to comment.