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

decrease timeouts to detect regressions faster in future #2800

Merged
merged 16 commits into from
Oct 25, 2017

Conversation

PieterGit
Copy link
Contributor

Reverts increasing timeouts. I think these timeouts are enough to make a succesfull build on Travis CI.

…ng to 25 sec.

```
not ok 1 admintools "before all" hook
  Error: timeout of 20000ms exceeded. Ensure the done() callback is being called in this test.
      at tests/admintools.test.js:177:7
      at Object.done (node_modules/benv/index.js:32:21)
      at process.nextTick (node_modules/jsdom/lib/old-api.js:347:18)
      at _combinedTickCallback (internal/process/next_tick.js:131:7)
      at process._tickCallback (internal/process/next_tick.js:180:9)

not ok 203 Profile editor "before each" hook for "should produce some html"
  Error: timeout of 20000ms exceeded. Ensure the done() callback is being called in this test.
      at tests/fixtures/headless.js:160:7
      at Object.module.exports.setup (node_modules/benv/index.js:24:56)
      at Function.init [as setup] (tests/fixtures/headless.js:16:10)
      at Context.<anonymous> (tests/profileeditor.test.js:94:14)
```
@PieterGit
Copy link
Contributor Author

Summary of changes:
Coverage tests from 30 sec back to 15 sec
Travis tests from 50 sec back to 5 sec

Following tests need more than 5 sec

not ok 1 admintools "before all" hook
Error: timeout of 20000ms exceeded. Ensure the done() callback is being called in this test.
at tests/admintools.test.js:177:7
at Object.done (node_modules/benv/index.js:32:21)
at process.nextTick (node_modules/jsdom/lib/old-api.js:347:18)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)

==> Works with 25 sec

not ok 66 client "before each" hook for "open careportal, and enter a treatment"
Error: timeout of 5000ms exceeded. Ensure the done() callback is being called in this test.
at tests/fixtures/headless.js:160:7
at Object.done (node_modules/benv/index.js:32:21)
at process.nextTick (node_modules/jsdom/lib/old-api.js:347:18)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)

==> Works with 25 sec

not ok 101 hashauth "before each" hook for "should make module unauthorized"
Error: timeout of 25000ms exceeded. Ensure the done() callback is being called in this test.
at tests/fixtures/headless.js:160:7
at Object.module.exports.setup (node_modules/benv/index.js:24:56)
at Function.init [as setup] (tests/fixtures/headless.js:16:10)
at Context. (tests/hashauth.test.js:23:14)

==> Works with 40 sec

not ok 179 pluginbase "before each" hook for "does stuff"
Error: timeout of 5000ms exceeded. Ensure the done() callback is being called in this test.
at tests/fixtures/headless.js:160:7
at Object.module.exports.setup (node_modules/benv/index.js:24:56)
at Function.init [as setup] (tests/fixtures/headless.js:16:10)
at Context. (tests/pluginbase.test.js:18:14)

==> Works with 25 sec

not ok 204 Profile editor "before each" hook for "should produce some html"
Error: timeout of 25000ms exceeded. Ensure the done() callback is being called in this test.
at tests/fixtures/headless.js:160:7
at Object.module.exports.setup (node_modules/benv/index.js:24:56)
at Function.init [as setup] (tests/fixtures/headless.js:16:10)
at Context. (tests/profileeditor.test.js:94:14)

==> Works with 40 sec

@PieterGit
Copy link
Contributor Author

@sulkaharo : can you merge to dev? I think this is a stable configuration for the tests.

@PieterGit
Copy link
Contributor Author

I noticed all tests fail on the callback, and fail at tests/fixtures/headless.js.

@sulkaharo
Copy link
Member

Just had the build fail due to a timeout with the longer timeouts, so not merging yet - we do need to find out why the timeouts happen in Travis :(

@PieterGit
Copy link
Contributor Author

PieterGit commented Sep 20, 2017

@sulkaharo : What test did fail in that case?
I wondered if it might be that the bundle.js loading in the benv takes too long in tests/fixtures/headless.js on Travis. It seems the benv object is recreated for each test.

Is there some kind of way of to a different initialization? My nodejs/benv skills are not sufficient for solving that. See https://github.com/nightscout/cgm-remote-monitor/blob/dev/tests/fixtures/headless.js#L18

@PieterGit
Copy link
Contributor Author

@sulkaharo : I updated this branch to Node 8.7.0 (PR #2800 ). This seems to work fine. To minimize travis errors I upped careportal.test.js and pluginbase.test.js to 30 seconds. Please review and merge to dev (once Azure supports 8.7.0+)

@sulkaharo sulkaharo merged commit c6af0aa into nightscout:dev Oct 25, 2017
@PieterGit PieterGit deleted the travis_improve branch December 24, 2018 12:39
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