Skip to content

Commit

Permalink
Workaround flaky ProcessName behavior during process startup
Browse files Browse the repository at this point in the history
Reenable long Process.Name test on OSX

Fixes dotnet#111460
Fixes dotnet#29330
  • Loading branch information
jkotas committed Jan 27, 2025
1 parent f41b65f commit 0022ee7
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2264,7 +2264,6 @@ public void TestLongProcessIsWorking()
}

[PlatformSpecific(TestPlatforms.AnyUnix)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/29330", TestPlatforms.OSX)]
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/52852", TestPlatforms.MacCatalyst)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/53095", TestPlatforms.Android)]
Expand Down Expand Up @@ -2294,6 +2293,10 @@ public void LongProcessNamesAreSupported()

using (Process px = Process.Start(sleepCommandPathFileName, "600"))
{
// Reading of long process names is flaky during process startup and shutdown.
// Wait a bit to skip over the period where the ProcessName is not reliable.
Thread.Sleep(100);

Process[] runningProcesses = Process.GetProcesses();
try
{
Expand Down

0 comments on commit 0022ee7

Please sign in to comment.