-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Exit process if error passed to broadcast #520
Conversation
Note: build failed with one of the pesky animation errors. I ran |
@Resseguie I restarted the build , let's see if that helps. |
I'll take a look at that test. As written it is sensitive to timing still. |
@divanvisagie Is it possible for me to restart the build like that, or just collaborators? |
console.log(err.message.red); | ||
} | ||
|
||
process.exit(1); |
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.
cc @divanvisagie what do you think, re: tests?
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.
@rwaldron I think it would be nice to have a test for this situation
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.
What exactly would we be testing for? Do we just test that certain error(s) cause the program to gracefully exit?
We originally got this trying to use XBee. We'd get a ready event even though the XBees weren't actually talking. But my code assumed all was fine because it let me proceed.
Some questions to think about:
- How do we reproduce such a scenario in the tests?
- What other potential errors are broadcast that we'd want to test they also gracefully exit?
- Are there types of errors passed to broadcast() that we DON'T want to fully exit the process?
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.
I'm not going to block on this because I'm not sure process.exit
can be mocked correctly.
I honestly don't know , the rebuild button was a recent discovery for myself as well. Best way to find out is for you to go to this build and see if you can see the button |
Nope I don't have that one, just the download log (horizontal lines) button. |
LGTM @Resseguie you're a committer now, so please land. Thanks! |
Exit process if error passed to broadcast
Fixes #519