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

Travis timeouts during integration tests #4277

Closed
ErisDS opened this issue Oct 14, 2014 · 3 comments · Fixed by #4371
Closed

Travis timeouts during integration tests #4277

ErisDS opened this issue Oct 14, 2014 · 3 comments · Fixed by #4371
Milestone

Comments

@ErisDS
Copy link
Member

ErisDS commented Oct 14, 2014

We did have a lovely period where the tests behaved themselves. Unfortunately that is no longer the case and the integration tests are regularly timing out (seems to be getting worse).

These are definitely random failures but I think it's likely caused by a code change. It's definitely driving us all potty!

An example from https://travis-ci.org/TryGhost/Ghost/jobs/37595786

  1) Users API "before each" hook:
     Error: timeout of 15000ms exceeded
      at null.<anonymous> (/home/travis/build/TryGhost/Ghost/node_modules/mocha/lib/runnable.js:157:19)
      at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)
  2) Exporter "before each" hook:
     Error: timeout of 15000ms exceeded
      at null.<anonymous> (/home/travis/build/TryGhost/Ghost/node_modules/mocha/lib/runnable.js:157:19)
      at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)
  3) Import Resolves "before each" hook:
     Error: ER_TABLE_EXISTS_ERROR: Table 'permissions' already exists
      at Query.Sequence._packetToError 

Another example from https://travis-ci.org/TryGhost/Ghost/jobs/37810065

  1) Admin Routing Require HTTPS - no redirect "before all" hook:
     Error: Timed out waiting for child process
      at Socket.<anonymous> (/home/travis/build/TryGhost/Ghost/core/test/utils/fork.js:100:40)
      at Socket.emit (events.js:95:17)
      at net.js:440:14
      at process._tickDomainCallback (node.js:463:13)
  2) Admin Routing Require HTTPS - no redirect "after all" hook:
     Error: timeout of 15000ms exceeded
      at null.<anonymous> (/home/travis/build/TryGhost/Ghost/node_modules/mocha/lib/runnable.js:157:19)
      at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)
  3) Frontend Routing HTTPS should set links to url over non-HTTPS:
     Error: expected body '<!DOCTYPE html>\n<html>\n<head>\n    <meta charset="utf-8" />\n    <meta http-equiv="X-UA-Compatible" content="IE=edge" />\n\n    <title>Ghost</title>\n    <meta name="description" content="Just a blogging platform." />\n\n    <meta name="HandheldFriendly" content="True" />\n    <meta name="viewport" content="width=device-width, initial-scale=1.0" />\n\n    <link rel="shortcut icon" href="/favicon.ico">\n\n    <link rel="stylesheet" type="text/css" href="/assets/css/screen.css?v=fda6dbbb81" />\n    <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Merriweather:300,700,700italic,300italic|Open+Sans:700,400" />\n\n    <link rel="canonical" href="http://127.0.0.1:2371/" />\n    <meta name="generator" content="Ghost 0.5" />\n    <link rel="alternate" type="application/rss+xml" title="Ghost" href="/rss/" />\n</head>\n<body class="home-template">\n\n    \n<header class="main-header no-cover">\n    <nav class="main-nav overlay clearfix">\n        \n        <a class="subscribe-button icon-feed" href="http://127.0.0.1:2371/rss/">Subscribe</a>\n    </nav>\n    <div class="vertical">\n        <div class="main-header-content inner">\n            <h1 class="page-title">Ghost</h1>\n            <h2 class="page-description">Just a blogging platform.</h2>\n        </div>\n    </div>\n    <a class="scroll-down icon-arrow-left" href="#content" data-offset="-45"><span class="hidden">Scroll Down</span></a>\n</header>\n\n<main id="content" class="content" role="main">\n\n    <div class="extra-pagination inner">\n        <nav class="pagination" role="navigation">\n        <span class="page-number">Page 1 of 1</span>\n    </nav>\n    </div>\n    \n    <article class="post tag-getting-started">\n        <header class="post-header">\n            <h2 class="post-title"><a href="/welcome-to-ghost/">Welcome to Ghost</a></h2>\n        </header>\n        <section class="post-excerpt">\n            <p>You\'re live! Nice. We\'ve put together a little post to introduce you to the Ghost editor and get you started. You can manage your content by <a class="read-more" href="/welcome-to-ghost/">&raquo;</a></p>\n        </section>\n        <footer class="post-meta">\n            \n            <a href="/author/ghost-owner/">Ghost Owner</a>\n             on <a href="/tag/getting-started/">Getting Started</a>\n            <time class="post-date" datetime="2014-10-13">13 October 2014</time>\n        </footer>\n    </article>\n    \n    <nav class="pagination" role="navigation">\n        <span class="page-number">Page 1 of 1</span>\n    </nav>\n\n</main>\n\n    <footer class="site-footer clearfix">\n         <section class="copyright"><a href="http://127.0.0.1:2371">Ghost</a> &copy; 2014</section>\n         <section class="poweredby">Proudly published with <a href="https://ghost.org">Ghost</a></section>\n    </footer>\n\n    <script src="/public/jquery.js?v=fda6dbbb81"></script>\n\n    <script type="text/javascript" src="/assets/js/jquery.fitvids.js?v=fda6dbbb81"></script>\n    <script type="text/javascript" src="/assets/js/index.js?v=fda6dbbb81"></script>\n\n</body>\n</html>\n' to match /<link rel="canonical" href="http:\/\/127.0.0.1:2370\/" \/\>/
      at error (/home/travis/build/TryGhost/Ghost/node_modules/supertest/lib/test.js:235:13)
      at Test.assert (/home/travis/build/TryGhost/Ghost/node_modules/supertest/lib/test.js:177:23)
      at assert (/home/travis/build/TryGhost/Ghost/node_modules/supertest/lib/test.js:132:12)
      at /home/travis/build/TryGhost/Ghost/node_modules/supertest/lib/test.js:129:5
      at Test.Request.callback (/home/travis/build/TryGhost/Ghost/node_modules/supertest/node_modules/superagent/lib/node/index.js:728:30)
      at Test.<anonymous> (/home/travis/build/TryGhost/Ghost/node_modules/supertest/node_modules/superagent/lib/node/index.js:135:10)
      at Test.emit (events.js:95:17)
      at Stream.<anonymous> (/home/travis/build/TryGhost/Ghost/node_modules/supertest/node_modules/superagent/lib/node/index.js:886:12)
      at Stream.emit (events.js:117:20)
      at Unzip.<anonymous> (/home/travis/build/TryGhost/Ghost/node_modules/supertest/node_modules/superagent/lib/node/utils.js:124:12)
      at Unzip.emit (events.js:117:20)
      at _stream_readable.js:943:16
      at process._tickDomainCallback (node.js:463:13)
@ErisDS ErisDS added the tests label Oct 14, 2014
@ErisDS ErisDS added this to the 0.5.x Backlog milestone Oct 14, 2014
ErisDS added a commit to ErisDS/Ghost that referenced this issue Oct 17, 2014
ref TryGhost#4277

- mail API tests are failing consistently locally
- skip the failing tests
- restructure existing tests to match patterns from other tests
@ErisDS
Copy link
Member Author

ErisDS commented Oct 18, 2014

@javorszky I didn't create a second issue for the mail API test issues because I think it was the cause, or at least one of the major causes of this issue.

I think some of the tests weren't quite doing what you expect. I've changed them to use the same pattern as other tests for checking for errors etc, and this highlights that some of the tests were failing. I marked the ones that are failing with skip, so they are still in the codebase, but not run.

@javorszky
Copy link
Contributor

All right, will take it for a spin, and see what I can do about them.

@jaswilli
Copy link
Contributor

I've been experimenting with Ubuntu 14.04 (because it ships with gcc/g++ 4.8 by default) and the test suite literally never passes because of these errors. The problem? Gravatar image lookup requests getting stuck while adding a user.

I couldn't even make this stuff up if I tried 😝

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 a pull request may close this issue.

3 participants