-
-
Notifications
You must be signed in to change notification settings - Fork 144
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
MSTest/NET48 hangs with custom file converter #751
Comments
can you submit a pull request with a failing test |
I suspect the problem is vstests use of .GetAwaiter().GetResult() microsoft/testfx#1284 Can you repro in xunit or nunit? |
Added a PR with failing test. Same test in NUnit works just fine. There is some race condition involved: when stepping through sometimes there is no deadlock. |
i dont think there is anything i can do in the Verify code. even changing or alternatively you can move to xunit/nunit, or stop using Verify |
It looks like it's a problem specifically with the combination of MSTest and WinForms, and this StackOverflow answer (pointing to an implementation of WindowsFormsContext) solves the issue. |
Hi @TymurGubayev, I am part of the MSTest team, I am curious to understand if this issue is a randomic issue for you or if that's something that reliably/consistently fails? @SimonCropp PR to fix the issue is awesome but will currently be released in v4. As there are quite some breaking changes related to this update, I'd like to understand if we can follow our roadmap or if we should discuss internally to do an anticipated release. Thank! And thanks again @SimonCropp . |
Hi @Evangelink it fails consistently when I just run the test, just reproduced it on a different machine (source code from TymurGubayev@bb1c111). |
given we cant repro. and there is questionable threading in mstests. closing this one for now |
Description
Using MSTest 3.0.2, Verify commit cc00a56 (02.01.2023) and custom file converter from Verify.WinForms, the very basic test (
Verify(new Button())
) hangs.Minimal Repro
Copy VerifyWinForms.cs
to
Verify.MSTest.Tests/WinForms/VerifyWinForms.cs
.Create
Verify.MSTest.Tests/WinForms/UnitTest1.cs
:A solution or workaround
I tracked the problem down to IoHelpers/WriteStream, specifically this line:
Replacing it with
fixes the issue.
The text was updated successfully, but these errors were encountered: