Replies: 11 comments
-
Hmm the stack trace should include it, but I might be able to throw the exception in a different way such that it does. That said, with the right output parameters for |
Beta Was this translation helpful? Give feedback.
-
Adding |
Beta Was this translation helpful? Give feedback.
-
Ahh the test passes? So you see an exception in the logs but no test is failing? My guess is that the component continues to do is async renders after the test finishes. Try adding logging to better see what's going on (https://bunit.dev/docs/misc-test-tips.html#capturing-logs-from-ilogger-in-test-output). |
Beta Was this translation helpful? Give feedback.
-
Well, I tried that before, but the weird thing is in my local dev env I don't get this exception. Only during CI pipeline in github actions. And anyway the logging you suggest should happen on a test in question. But in the log I cannot figure out what test it is 😕 . So at this stage it is the |
Beta Was this translation helpful? Give feedback.
-
Can you narrow it down to a few tests? What if you dont run tests in parallel but sequential, and look at tests that call Another solution is to simply add a |
Beta Was this translation helpful? Give feedback.
-
All suggestions are fine with but with cons:
If you think my request to add test name to the exception is unreasonable, I won't mind if you close this issue. I will continue to enjoy your great work 💯 🙇🏻♂️ . |
Beta Was this translation helpful? Give feedback.
-
Btw. the reason this happens on CI pipeline and not locally can be because you have a much faster machine, or that you are running a different OS. I have had similar challenges with bUnit from time to time, and created the following test-runner script, it runs some or all tests in a loop until something breaks. Used that locally to run the tests until I could trigger the error locally and then be able to investigate faster. |
Beta Was this translation helpful? Give feedback.
-
That is a nice idea, thanks for sharing! |
Beta Was this translation helpful? Give feedback.
-
Also, I am not sure I can provide more context in the stack trace in this scenario, where the invocation happens on a different thread than the test thread. In your case, the call is coming, perhaps after a |
Beta Was this translation helpful? Give feedback.
-
One thing I noticed - when I was debugging to try to figure out what was the problem with #522 (so I had |
Beta Was this translation helpful? Give feedback.
-
codecov slows things down. however, running locally sequentially should work, and you can filter out tests that you know are not affected to e.g. only run a few. See my test runner script linked above
There is no performance difference, or nothing measurable. It might actually be faster if it is registered. However, for tests where you specifically want to do something with the invocation handler that you get when you setup an invocation.
I get that. You can always just ignore the error by registering an invocation handler or changing the JSInterop.Mode to
I wont say unreasonable, probably more impossible :) Thanks, and lets convert this to an discussion. Would love to know if you end up figuring out under what condition this happens in, maybe there is something I can then. |
Beta Was this translation helpful? Give feedback.
-
Is the feature request related to a problem? Please elaborate.
I develop in Visual Studio. I often am in a situation that my local tests are passing, but in github actions I get an exception like this:
My problem is that I have no clue which test actually has this issue.
The suggested solution
Is it possible to add to the message the offending test name?
Beta Was this translation helpful? Give feedback.
All reactions