-
Notifications
You must be signed in to change notification settings - Fork 79
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
Stop swallowing errors in test-machine #144
Conversation
Codecov Report
@@ Coverage Diff @@
## master #144 +/- ##
==========================================
- Coverage 81.04% 80.85% -0.19%
==========================================
Files 39 39
Lines 2321 2351 +30
Branches 147 149 +2
==========================================
+ Hits 1881 1901 +20
- Misses 293 301 +8
- Partials 147 149 +2
Continue to review full report at Codecov.
|
(deliver p {:result :found}) | ||
(deliver p result))))] | ||
|
||
(deliver p {:result :found |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change addresses another usability problem encountered in the wild. Test authors could confuse the middleware if they wrote a condition?
function that returned a map containing a :result
key. The original intention was that the return value might be of interest to the test author when making assertions about the results but clearly it is safer to include the result in it's own :info
key to make sure it doesn't collide with what the middleware is expecting to see.
When working with the test-machine, it makes for a significantly better developer workflow when any exceptions that occur are bubbled back up to the main thread. Prior versions were catching errors and sometimes not even logging them (mea culpa!).
This PR adds tests with a few of the errors we've seen developers make and ensures that the resulting exception (including the full cause trace) is logged and the exception is bubbled back up to the main thread after all the resources used by the test are torn back down.