Skip to content

Commit 0022ee7

Browse files
committed
Workaround flaky ProcessName behavior during process startup
Reenable long Process.Name test on OSX Fixes dotnet#111460 Fixes dotnet#29330
1 parent f41b65f commit 0022ee7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -2264,7 +2264,6 @@ public void TestLongProcessIsWorking()
22642264
}
22652265

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

22952294
using (Process px = Process.Start(sleepCommandPathFileName, "600"))
22962295
{
2296+
// Reading of long process names is flaky during process startup and shutdown.
2297+
// Wait a bit to skip over the period where the ProcessName is not reliable.
2298+
Thread.Sleep(100);
2299+
22972300
Process[] runningProcesses = Process.GetProcesses();
22982301
try
22992302
{

0 commit comments

Comments
 (0)