Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix exception thrown in SigningTestFixture during disposing #3464

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,9 @@ private void HandleRequest()
if (ex.ErrorCode == ErrorConstants.ERROR_OPERATION_ABORTED ||
ex.ErrorCode == ErrorConstants.ERROR_INVALID_HANDLE ||
ex.ErrorCode == ErrorConstants.ERROR_INVALID_FUNCTION ||
RuntimeEnvironmentHelper.IsMono && ex.ErrorCode == ErrorConstants.ERROR_OPERATION_ABORTED_MONO)
RuntimeEnvironmentHelper.IsMono && ex.ErrorCode == ErrorConstants.ERROR_OPERATION_ABORTED_UNIX ||
RuntimeEnvironmentHelper.IsLinux && ex.ErrorCode == ErrorConstants.ERROR_OPERATION_ABORTED_UNIX ||
RuntimeEnvironmentHelper.IsMacOSX && ex.ErrorCode == ErrorConstants.ERROR_OPERATION_ABORTED_UNIX)
{
return;
}
Expand Down
4 changes: 2 additions & 2 deletions test/TestUtilities/Test.Utility/ErrorConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ public static class ErrorConstants
public const int ERROR_OPERATION_ABORTED = 995;
public const int ERROR_INVALID_HANDLE = 6;
public const int ERROR_INVALID_FUNCTION = 1;
public const int ERROR_OPERATION_ABORTED_MONO = 500;
public const int ERROR_OPERATION_ABORTED_UNIX = 500;
}
}
}
4 changes: 3 additions & 1 deletion test/TestUtilities/Test.Utility/Signing/SigningTestServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ private void HandleRequest(ManualResetEventSlim mutex, CancellationToken cancell
if (ex.ErrorCode == ErrorConstants.ERROR_OPERATION_ABORTED ||
ex.ErrorCode == ErrorConstants.ERROR_INVALID_HANDLE ||
ex.ErrorCode == ErrorConstants.ERROR_INVALID_FUNCTION ||
RuntimeEnvironmentHelper.IsMono && ex.ErrorCode == ErrorConstants.ERROR_OPERATION_ABORTED_MONO)
RuntimeEnvironmentHelper.IsMono && ex.ErrorCode == ErrorConstants.ERROR_OPERATION_ABORTED_UNIX ||
RuntimeEnvironmentHelper.IsLinux && ex.ErrorCode == ErrorConstants.ERROR_OPERATION_ABORTED_UNIX ||
RuntimeEnvironmentHelper.IsMacOSX && ex.ErrorCode == ErrorConstants.ERROR_OPERATION_ABORTED_UNIX)
{
return;
}
Expand Down