Skip to content

Commit

Permalink
ProcessWatchdogTest: only check exit code 259 on Windows
Browse files Browse the repository at this point in the history
This code is out of range of valid exit codes on Unix anyway.
  • Loading branch information
ForNeVeR committed Dec 2, 2023
1 parent d2107f0 commit ef45bfa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rd-net/Test.Lifetimes/Diagnostics/ProcessWatchdogTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ public class ProcessWatchdogTest : LifetimesTestBase
public Task TestWithSleepingProcess() => DoTest(StartSleepingProcess, true);

[Test]
public Task TestWithProcessReturning259() => DoTest(() => GetTerminatedProcess(259), false);
public async Task TestWithProcessReturning259()
{
if (!RuntimeInfo.IsRunningUnderWindows) return;
await DoTest(() => GetTerminatedProcess(259), false);
}

private static Task DoTest(Func<Process> processCreator, bool assertAlive) => Lifetime.UsingAsync(async lt =>
{
Expand Down

0 comments on commit ef45bfa

Please sign in to comment.