-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Common Test "eating" stacktraces #5719
Comments
I don't know why but I think it is because of backwards compatibility. When common_test was built there either was no try/catch or it was very new and the test case code was thus guarded using a Before I think that it should be possible to change this now that |
Thanks for the quick response @garazdawi ! Is this something the OTP team can take care of or is help needed? |
I'll will defer that question to @u3s and @IngelaAndin as I don't work much with ct nowadays. |
common test issues are currently not that highly prioritized, mostly due to other things being even more important, so I guess if you want to see it fairly soon help is wanted. |
since the response of the thrown is now a stacktrace. Going to have to change test results for badmatch from common_test sections. Just worried about down stream apps outside of erlang project being a breaking change. Since response from thrown is now a stack. Will probably update the PR in a day or 2. Thanks again for the help. |
…traces Adding Stacktrace to thrown Closes #5719 OTP-18138
Hi!
We noticed that Common Test does not preserve stacktraces for throws, but it does for errors. This can complicate debugging.
Some occurrences where this happens:
https://github.com/erlang/otp/blob/master/lib/common_test/src/test_server.erl#L1581-L1585
https://github.com/erlang/otp/blob/master/lib/common_test/src/test_server.erl#L1649-L1652
https://github.com/erlang/otp/blob/master/lib/common_test/src/test_server.erl#L1792-L1793
For example, the following happens if I add a
error(foo)
in theinit_per_testcase/2
:While this happens if I use
throw(foo)
:We were wondering if there's any specific reason behind this behaviour.
The text was updated successfully, but these errors were encountered: