Skip to content

Prevent vows from swallowing test errors on uncaught errors within topics #452

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

Merged

Conversation

IamfromSpace
Copy link
Contributor

Hello, been looking around at making some further contributions, and came across an issue where vows would swallow errors, making it very difficult to debug. Very simple one liner (with a comment to explain its purpose).

What was a fairly simple issue (I had a process listening on 8081 that I'd forgotten about), prevented my tests from passing, with no meaningfully related error output. This cost me a little over an hour of troubleshooting, until I was able to find the magic uncaughtException event, which clearly spelled out the problem. Hoping to contribute back to help the next person!

Validating the behavior difference is fairly simple, just start an http-server on 8081 before executing tests on master vs this branch.

Cheers!

@BigBlueHat
Copy link
Member

Thanks for this change!

@IamfromSpace is this mostly to get ride of the ✗ Errored » callback not fired messages (which are rather confusing)?

It might be good if we also threw an error/warning about something already listening on 8080 and/or 8081--as something on either of those ports will make some mix of the tests fail.

Thoughts?

@IamfromSpace
Copy link
Contributor Author

Yep, that's exactly the error I was seeing!

As for more explicit error messaging around a port in use (as absolutely, that should be one of the most common cases), once the error got through, that's pretty much what it said. After having been totally stumped for a good long while it was immediately clear to me what was happening. I'd opt for a simpler implementation, given that the error is pretty clear.

@thornjad
Copy link
Member

This is definitely helpful, in fact I needed to make this change while making tests for #463 (I was requesting the wrong port number). I think this looks great as is!

@thornjad thornjad added this to the v0.12.0 milestone Feb 28, 2019
@thornjad thornjad merged commit d328f58 into http-party:master Apr 15, 2019
thornjad added a commit that referenced this pull request Apr 15, 2019
...nt-vows-error-swallowing

Prevent vows from swallowing test errors on uncaught errors within
topics
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants