You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actual behavior: If controller.Finish() is called and then also deferred, any following panic is recovered and silently discarded by the controller. Also, no error message is printed regarding several calls to controller.Finish(), which should be called only once.
Expected behavior: I expected the panic to happen and the test to fail, or at least an error message to be printed about multiple calls to controller.Finish().
The exact return causing the behavior is this one.
I know this is not a completely conventional usage of the library. However, I think it's not nice that the library can silently ignore a panic under certain conditions. Docs also state nothing about the exact side-effects of executing controller.Finish() several times, they just say that it is not idempotent and therefore can only be invoked once. and if you pass a *testing.T into NewController, you no longer need to call ctrl.Finish() in your test methods.
Actual behavior: If
controller.Finish()
is called and then also deferred, any following panic is recovered and silently discarded by the controller. Also, no error message is printed regarding several calls tocontroller.Finish()
, which should be called only once.Expected behavior: I expected the panic to happen and the test to fail, or at least an error message to be printed about multiple calls to
controller.Finish()
.To Reproduce: Here is a minimal Go Playground example.
Additional Information
The exact return causing the behavior is this one.
I know this is not a completely conventional usage of the library. However, I think it's not nice that the library can silently ignore a panic under certain conditions. Docs also state nothing about the exact side-effects of executing
controller.Finish()
several times, they just say that it is not idempotent and therefore can only be invoked once. and if you pass a *testing.T into NewController, you no longer need to call ctrl.Finish() in your test methods.The text was updated successfully, but these errors were encountered: