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

fix: increase test reliability #2803

Closed

Conversation

zachary-kuhn
Copy link

@zachary-kuhn zachary-kuhn commented Oct 25, 2018

Cause

When running tests locally:

  • the Cypress test takes longer than 60 seconds so it times out

screen shot 2018-10-24 at 8 25 27 pm

  • the Jest w/ Babel one fails due to not being able to find a file in @babel/runtime

screen shot 2018-10-24 at 8 36 45 pm

.

When running on AppVeyor:

  • the Jest plugin test takes longer than 20 seconds.

screen shot 2018-10-24 at 8 26 20 pm

When running on CircleCI:

  • the eslint plugin test detects the warning message multiple times

Changes

  • Run Cypress tests with the --headless option for everyone except AppVeyor and increase the timeout to 120 seconds. It appears a new version of Cypress doesn't automatically run the tests when the GUI is shown, so the test will never complete
  • Pin the @babel/runtime version to 7.0.0-beta.55 as figured out with this other library
  • Increase the Jest timeout to 40 seconds for AppVeyor
  • Run the eslint test's file change immediately. I don't know if this actually solves the problem—this could be a test that fails sporadically on CircleCI still—but it has passed at least 1 run locally and on CI

Concerns

  • Pinning the Babel runtime version isn't ideal

Possible Future Enhancements

  • Figure out the root problem of why it is trying to load interopRequireDefault.js in the /builtin directory

@zachary-kuhn zachary-kuhn changed the title Fix/increase test reliability fix: increase test reliability Oct 25, 2018
@haoqunjiang
Copy link
Member

Hi, thanks for your advice but I think there are different causes for the test failures:

  1. Cypress tests takes longer than 60 seconds
    This only happens in a non-CI environment because some bugs can only be identified when running cypress with a UI interface. So we want to manually run the tests during development. In a CI environment it will run in headless mode and everything's fine.

  2. the Jest w/ Babel one fails due to not being able to find a file in @babel/runtime
    Fixed by adding absoluteRuntime option 1418178

  3. When running on AppVeyor: the Jest plugin test takes longer than 20 seconds.
    We have increased the timeout for AppVeyor multiple times, but this still happens from time to time. The root cause is the limited resources allocated for free plan users. I think we might have to live with it. (BTW it seems to be working fine again recently)

  4. When running on CircleCI: the eslint plugin test detects the warning message multiple times
    Fixed by 662b1d3

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.

2 participants