-
Notifications
You must be signed in to change notification settings - Fork 353
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
Make RemoteExecutor throw RemoteExecutorNotSupportedException for size restricted workloads #5401
Conversation
…e restricted workloads Because size restricted workloads typically do not allow spawning processes, we will throw RemoteExecutorNotSupportedExceptions for iOS, tvOS, watchOS, and android. We will also note the tests as skipped through SkippedTestMessageBus.
src/Microsoft.DotNet.XUnitExtensions/src/SkippedTestMessageBus.cs
Outdated
Show resolved
Hide resolved
@@ -36,7 +36,7 @@ public bool QueueMessage(IMessageSinkMessage message) | |||
if (testFailed != null) | |||
{ | |||
var exceptionType = testFailed.ExceptionTypes.FirstOrDefault(); | |||
if (exceptionType == typeof(SkipTestException).FullName) | |||
if (exceptionType == typeof(SkipTestException).FullName || exceptionType == "Microsoft.DotNet.RemoteExecutor.RemoteExecutorNotSupportedException") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was under the impression the SkipTestException logic only applied to tests marked as ConditionalFact/Theory. Is that not the case? If it is the case, is the plan to change all of those tests to be ConditionalFact/Theory and to require that of any test that uses RemoteExecutor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's my understanding as well. I'm under the impression that we will need to go in and add ConditionalFact/Theory to the right places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this means that now all tests that use RemoteExecutor
need to use ConditionalFact/Theory
?
Should we also add the handling of the skipped test when a SkipTestException
is thrown to the xharness
test runners?
Maybe, here: https://github.com/dotnet/xharness/blob/master/src/Microsoft.DotNet.XHarness.Tests.Runners/xUnit/XUnitTestRunner.cs#L222? |
I assume adding |
Yeah, I think we should add support for this to the xharness xunit runner. For example I think we can add something similar to: https://github.com/dotnet/arcade/blob/master/src/Microsoft.DotNet.XUnitExtensions/src/SkippedTestMessageBus.cs#L41 Where we check if we're handling a test failure, look at the exception type, if it is |
Make sense |
Because size restricted workloads typically do not allow spawning processes, we will throw SkipTestException for iOS, tvOS, watchOS, and android. The xharness test runner will also need to be modified in order to fully skip tests that are impacted by this change. Another PR will be filed to take care of that.