-
Notifications
You must be signed in to change notification settings - Fork 750
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
test: Update to MSTest dogfooding version #19271
base: master
Are you sure you want to change the base?
Conversation
// TODO: !!IMPORTANT!! If this assert failed it will be currently **swallowed**. | ||
// It's not going to fail the test nor crash the process. | ||
// This is NOT a false positive of the analyzer. | ||
#pragma warning disable MSTEST0040 // Do not assert inside 'async void' contexts | ||
Assert.IsFalse(triggered); | ||
#pragma warning restore MSTEST0040 // Do not assert inside 'async void' contexts |
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.
FYI @jeromelaban
It's quite interesting for Uno's case because generally if this was a "typical" test app, it would have crashed the whole process. I assume it doesn't crash the process because of NativeDispatcher swallowing the exception (it's likely used via NativeDispatcherSynchronizationContext
)? So currently such failure will only be logged.
cc @Evangelink Maybe we should reword the doc (and analyzer description) to mention that it may either be swallowed in certain cases, or crashes the whole process. Customers reading the doc may say "okay I'll suppress, it's fine if it crashed the process and then I'll know that it failed", but that's not always true.
@@ -120,7 +120,7 @@ async Task WaitAndSnapshotValue(int millisecondsDelay) | |||
[TestMethod] | |||
public async Task When_RepeatForever_ShouldLoop() | |||
{ | |||
async void Do() | |||
async Task Do() |
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.
Same here. This was a real problem as failures won't be captured.
# MSTEST0006: Avoid '[ExpectedException]' | ||
dotnet_diagnostic.MSTEST0006.severity = warning |
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.
FYI microsoft/testfx#135 so you have context why we implemented the analyzer and why to enable it.
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-19271/index.html |
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-19271/index.html |
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-19271/index.html |
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-19271/index.html |
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-19271/index.html |
src/SamplesApp/UnoIslandsSamplesApp.Skia.Wpf/MainWindow.xaml.cs
Outdated
Show resolved
Hide resolved
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-19271/index.html |
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-19271/index.html |
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-19271/index.html |
|
GitHub Issue (If applicable): closes #
PR Type
What kind of change does this PR introduce?
What is the current behavior?
What is the new behavior?
PR Checklist
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Run
results.Other information
Internal Issue (If applicable):