-
Notifications
You must be signed in to change notification settings - Fork 91
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
Sometimes, errors and failures during a test aren't caught. #650
Comments
Are you able to construct and provide a self-contained, minimal reproduction of the problem? |
I will give it a shot. |
@markehammons Did you manage to find some minimization? |
@szymon-rd I haven't had time these past weeks to try. I will try to do that once I catch up. |
Hi! I got bitten by the same bug as in the linked issue. I reproduced it in an example project. https://github.com/FloWi/munit-bug-experiment/blob/main/src/test/scala/example/HelloSpec.scala In my original project I used This is the output
As you can see, the 1st test is displayed correctly. The 2nd test is being executed (the println statement gets written to stdout) but not reported as a failure. It's not displayed at all. The 3rd test doesn't even get executed. I would prefer mUnit to show the crashed test correctly and not silently hide it. |
It seems that the bug has been introduced in the v1 branch of munit. I tried it with these dependencies libraryDependencies ++= Seq(
"org.typelevel" %% "cats-core" % "2.9.0",
"org.scalameta" %% "munit" % "0.7.29" % Test,
) and it crashed as expected but reports the error.
When I use the latest milestone release, it just silently fails. libraryDependencies ++= Seq(
"org.typelevel" %% "cats-core" % "2.9.0",
"org.scalameta" %% "munit" % "1.0.0-M8" % Test
) I hope it helps with the bug-hunt. |
Thanks @FloWi for the detailed instruction to reproduce the problem. |
Glad I could help! Thanks for fixing the bug @mzuehlke! |
If you look at my repository here you'll see that my tests are all passing for this commit. However, only 3 tests from BindingSpec were being reported on. After noticing this and investigating, I found that the ZLib test I had written was crashing and stopping the evaluation of the tests following it. This has been a frustratingly common situation with Munit, and I'm not sure if it's because of the nature of my code, or something that needs resolved in Munit.
The text was updated successfully, but these errors were encountered: