-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[wasm] Enable System.Threading.Tasks.Extensions tests #38815
[wasm] Enable System.Threading.Tasks.Extensions tests #38815
Conversation
Tagging subscribers to this area: @tarekgh |
Most of these can easily be tweaked to avoid needing that. |
@stephentoub What would you suggest? |
5d19548
to
13fe8ee
Compare
Like this: |
This test suite still has a bunch of conditional checks for IsThreadingSupported... are all of those still needed? Or are they leftover from before |
Some new tests were failing locally for me, so I changed them to
Both of these had The other instances of
If there were other instances of |
That's expected since the test does Side note: I wonder whether this should've actually triggered the runtime/src/mono/mono/mini/mini-wasm.c Lines 611 to 614 in af4f8c2
|
The goal of the tests isn't to validate it's a different thread, just that the continuation is invoked asynchronously rather than synchronously. We can validate that in other ways. For example, we can store a value into an var tl = new ThreadLocal<T> { Value = 42 };
InvokeAsynchronously(() => Assert.NotEqual(42, tl.Value));
tl.Value = 0; In general I'd like disabling of such tests to be a last resort. |
@@ -399,7 +399,7 @@ async ValueTask<int> ValueTaskReturningAsyncMethod(int result) | |||
} | |||
} | |||
|
|||
[Fact] | |||
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] |
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.
If the test is hanging, shouldn't that be an ActiveIssue?
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've looked at it and it runs into an infinite loop in the threadpool pump loop in xharness as soon as we hit the "Incomplete" tests. I didn't have time to investigate more deeply but I agree, we should file an ActiveIssue for these cases.
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 created an ActiveIssue here #38931
Yeah I meant that was what the test is doing right now, we can obviously rewrite it :) |
…essary conditionalfacts
9e20e84
to
df224a9
Compare
The failing lane is in Linux x64, which is unrelated to changes in System.Threading.Tasks.Extensions for wasm. |
Contributes to #38422
Tests run: 184, Errors: 0, Failures: 0, Skipped: 1. Time: 0.350004s