Skip to content
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

Merged
merged 1 commit into from
Dec 10, 2014
Merged

Exit process if error passed to broadcast #520

merged 1 commit into from
Dec 10, 2014

Conversation

Resseguie
Copy link
Collaborator

Fixes #519

@Resseguie
Copy link
Collaborator Author

Note: build failed with one of the pesky animation errors. I ran grunt nodeunit locally w/o problem.

@divanvisagie
Copy link
Collaborator

@Resseguie I restarted the build , let's see if that helps.

@dtex
Copy link
Collaborator

dtex commented Dec 9, 2014

I'll take a look at that test. As written it is sensitive to timing still.

@Resseguie
Copy link
Collaborator Author

@divanvisagie Is it possible for me to restart the build like that, or just collaborators?

console.log(err.message.red);
}

process.exit(1);
Copy link
Owner

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?

Copy link
Collaborator

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

Copy link
Collaborator Author

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:

  1. How do we reproduce such a scenario in the tests?
  2. What other potential errors are broadcast that we'd want to test they also gracefully exit?
  3. Are there types of errors passed to broadcast() that we DON'T want to fully exit the process?

Copy link
Owner

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.

@divanvisagie
Copy link
Collaborator

@divanvisagie Is it possible for me to restart the build like that, or just collaborators?

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
screen shot 2014-12-09 at 9 18 03 pm

@Resseguie
Copy link
Collaborator Author

Nope I don't have that one, just the download log (horizontal lines) button.

@rwaldron
Copy link
Owner

rwaldron commented Dec 9, 2014

LGTM

@Resseguie you're a committer now, so please land. Thanks!

divanvisagie added a commit that referenced this pull request Dec 10, 2014
Exit process if error passed to broadcast
@divanvisagie divanvisagie merged commit 863f910 into rwaldron:master Dec 10, 2014
@Resseguie Resseguie deleted the board-connect branch December 10, 2014 19:03
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.

"ready" fired even if error occurs opening serial port
4 participants