Skip to content

Commit

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

Fixes #111460
Fixes #29330
  • Loading branch information
jkotas authored Jan 27, 2025
1 parent 2ac0591 commit b135297
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 b135297

Please sign in to comment.