-
Notifications
You must be signed in to change notification settings - Fork 555
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
panicing code results in tests passing? #529
Comments
note: i have just removed the bogun panic in grafana/metrictank#917 , so to reproduce you need a version older than that, such as 0.9.0 ( |
duplicate of #98 - you're effectively calling |
Go 2 Proposal for dealing with |
wow, ok. thanks ! let's close this then. |
actually, i imagine the answer will probably be no, but would it be possible for go-convey not to recover, that way if user code calls |
Well, 10 years later with the release of Go 1.21, we finally have closure!
|
Hello, using latest goconvey (just updated from master)
on this code base https://github.com/grafana/metrictank :
note that the function is question is buggy, the definition looks like so:
due to the extra panic statement, there is no way this function returns without panicing.
yet, when invoking a test method that uses this function, it passes:
I can trivially prove the panic is being triggered by changing the definition to
the "PANIC HERE" messages show in the output and the test passes:
I tried to reproduce this in a standalone case, but
this correctly shows the panic and fails the test.
i thought maybe it was because i use a custom struct type,
but also the following example shows the panic and fails like it should:
so I can't provide a simple example case,
however I can say that if you checkout github.com/grafana/metrictank, look at the defintion of MustMKeyFromString and the TestMixedBranchLeafDelete test method which calls that function, it should be able to reproduce
The text was updated successfully, but these errors were encountered: