Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/libraries/System.Console/tests/CancelKeyPress.Unix.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ public void HandlerInvokedForSigQuit(bool redirectStandardInput)
HandlerInvokedForSignal(SIGQUIT, redirectStandardInput);
}

private static readonly int WaitFailTestTimeoutSeconds = 30 * PlatformDetection.SlowRuntimeTimeoutModifier;

[ConditionalFact(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))]
public void ExitDetectionNotBlockedByHandler()
{
Expand Down Expand Up @@ -79,7 +81,10 @@ public void ExitDetectionNotBlockedByHandler()
// Release CancelKeyPress, and give it time to return and tear down the app
mre.Set();
Thread.Sleep(WaitFailTestTimeoutSeconds * 1000);
}, new RemoteInvokeOptions() { ExpectedExitCode = 130 }).Dispose();
}, new RemoteInvokeOptions() {
ExpectedExitCode = 130,
TimeOut = RemoteExecutor.FailWaitTimeoutMilliseconds * PlatformDetection.SlowRuntimeTimeoutModifier
}).Dispose();
}

private void HandlerInvokedForSignal(int signalOuter, bool redirectStandardInput)
Expand Down
2 changes: 0 additions & 2 deletions src/libraries/System.Console/tests/CancelKeyPress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

public partial class CancelKeyPressTests
{
private const int WaitFailTestTimeoutSeconds = 30;

[Fact]
[SkipOnPlatform(TestPlatforms.Browser | TestPlatforms.iOS | TestPlatforms.MacCatalyst | TestPlatforms.tvOS, "Not supported on Browser, iOS, MacCatalyst, or tvOS.")]
public static void CanAddAndRemoveHandler()
Expand Down