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

Jest failed, Travis Passed #6150

Closed
jimfb opened this issue Feb 29, 2016 · 17 comments
Closed

Jest failed, Travis Passed #6150

jimfb opened this issue Feb 29, 2016 · 17 comments

Comments

@jimfb
Copy link
Contributor

jimfb commented Feb 29, 2016

Calling it out as a separate issue so it doesn't get lost in the noise.

Jest clearly failed, but travis says everything is green:
https://travis-ci.org/facebook/react/jobs/112649566

Discovered in: #6121 (comment)

cc @zpao @spicyj

@zpao
Copy link
Member

zpao commented Feb 29, 2016

I pinged @cpojer to look at it. We might just want to downgrade our jest in the meantime.

@cpojer
Copy link
Contributor

cpojer commented Mar 2, 2016

I would recommend upgrading to 0.9.0-fb3 first. fb1 had some bugs.

@sophiebits
Copy link
Collaborator

My fault. Move the set -e out to after the "$TEST_TYPE" = test check so that it fails the build if any command fails. Maybe even move it to the top of the whole script -- but I thought there was some reason I didn't do that originally.

@cpojer
Copy link
Contributor

cpojer commented Mar 2, 2016

@spicyj can you elaborate what's going on here, just in case someone else runs into this and asks me? Also, please upgrade to fb3, the current one sometimes doesn't complete even if all tests pass. 0.9.0 is ready soon, with much better babel and npm3 support :)

@sophiebits
Copy link
Collaborator

Jest is properly returning 1, as is grunt, but since we run stuff after that Travis doesn't notice. That is, if you run

false  # failing command
true   # passing command

then that counts as a pass because only the last command's status matters. Unless you do set -e, in which case it bails out at the first error.

@cpojer
Copy link
Contributor

cpojer commented Mar 2, 2016

I see. The original problem was however about a worker thread unexpectedly quitting. This might be because one of the tests had a side-effect of killing a node-process for some bad reason.

@sophiebits
Copy link
Collaborator

Yeah, maybe that is a -fb1 problem.

@zpao
Copy link
Member

zpao commented Mar 2, 2016

We have -fb3 running (I cleaned the caches so we fetched the latest that matched): https://travis-ci.org/facebook/react/jobs/113204333#L242

@jimfb
Copy link
Contributor Author

jimfb commented Mar 22, 2016

I think travis is doing the right thing now.

@jimfb jimfb closed this as completed Mar 22, 2016
@sophiebits
Copy link
Collaborator

@jimfb That seems unlikely since set -e wasn't added to .travis.yml. You sure?

@jimfb
Copy link
Contributor Author

jimfb commented Mar 23, 2016

No, I'm not sure, but I did see a travis jest failure on a recent diff. Though, that diff may have had a syntax error, so it's possible it failed harder because it was unable to parse.

@jimfb jimfb reopened this Mar 23, 2016
@sophiebits
Copy link
Collaborator

Reading the current travis file, I wouldn't expect a jest failure to cause the travis job to fail.

@jimfb
Copy link
Contributor Author

jimfb commented Mar 23, 2016

¯\_(ツ)_/¯ and yet I'm 99.999% sure that I did witness travis saying the jest task was red :). But yeah, like I said, I'm now thinking it was because it the jest task failed at a different point in the task due to it being a syntax error instead of a less severe expectation violation.

@gaearon
Copy link
Collaborator

gaearon commented Mar 23, 2016

I removed set -e in d138b28. I wasn’t sure if it’s necessary or not, and since I was trying to make master behaves the same way as branches, I removed it from master for consistency. Should we add it back?

@sophiebits
Copy link
Collaborator

Yes, I think we have to.

@gaearon
Copy link
Collaborator

gaearon commented Mar 23, 2016

Should we also enable it for PRs? That discrepancy surprised me.

@sophiebits
Copy link
Collaborator

Yes. This bug was that it was on for master and not for PRs -- it should be on for all builds.

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

No branches or pull requests

5 participants