[wasm] Disable threading tests in System.Linq.Parallel#38382
[wasm] Disable threading tests in System.Linq.Parallel#38382stephentoub merged 1 commit intodotnet:masterfrom
Conversation
This allows the test suite to pass on WASM: `Tests run: 27708, Errors: 0, Failures: 0, Skipped: 107. Time: 159.380298s`
|
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
|
Did you run outerloop? |
What's the behavior of the skipped tests when they actually run? A hang? |
No, we haven't run the outerloop tests yet on any of the mobile platforms. That's a future step :)
The |
| { | ||
| if (partitions > 1 && !PlatformDetection.IsThreadingSupported) | ||
| { | ||
| throw new SkipTestException(nameof(PlatformDetection.IsThreadingSupported)); |
There was a problem hiding this comment.
This pattern seems pretty common across the various PRs being opened in this realm... maybe we should add a:
public static void ThrowSkipExceptionIfThreadingNotSupported();to PlatformDetection. Not a big deal, though.
There was a problem hiding this comment.
Right now it's only four cases across all the PRs we did so I feel like we don't need it yet.
|
|
||
| // Heavily exercises OrderBy, but only throws one user delegate exception to simulate an occasional failure. | ||
| [Theory] | ||
| [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] |
There was a problem hiding this comment.
I'm surprised so few tests needed to be disabled. I guess we're mostly saved by PLINQ's fall back to single-threaded execution when ProcessorCount == 1.
There was a problem hiding this comment.
Yeah I was surprised too and came to the same conclusion.
This allows the test suite to pass on WASM:
Tests run: 27708, Errors: 0, Failures: 0, Skipped: 107. Time: 159.380298s