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

Timeout default is incorrect, 200ms instead of 2000ms #3571

Closed
4 tasks done
juergba opened this issue Nov 14, 2018 · 6 comments
Closed
4 tasks done

Timeout default is incorrect, 200ms instead of 2000ms #3571

juergba opened this issue Nov 14, 2018 · 6 comments
Labels
status: wontfix typically a feature which won't be added, or a "bug" which is actually intended behavior

Comments

@juergba
Copy link
Contributor

juergba commented Nov 14, 2018

Prerequisites

  • Checked that your issue hasn't already been filed by cross-referencing issues with the faq label
  • Checked next-gen ES issues and syntax problems by using the same environment and/or transpiler configuration without Mocha to ensure it isn't just a feature that actually isn't supported in the environment in question or a bug in your code.
  • 'Smoke tested' the code to be tested by running it outside the real test suite to get a better sense of whether the problem is in the code under test, your usage of Mocha, or Mocha itself
  • Ensured that there is no discrepancy between the locally and globally installed versions of Mocha. You can find them with: node node_modules/.bin/mocha --version(Local) and mocha --version(Global). We recommend avoiding the use of globally installed Mocha.

Description

The timeout default value is set differently in the master branch and my local Mocha V5.2.0

describe('suite1', function () {
  console.log(this._timeout);
});

Output master branch: 200
Output my local Mocha: 2000

Many integration test are failing for that reason. These tests do pass correctly when using the flag --timeout=2000

Steps to Reproduce

Expected behavior: default timeout should be 2000ms

Actual behavior: default timeout is 200ms

Reproduces how often: always

Versions

  • The output of mocha --version and node node_modules/.bin/mocha --version: master branch
  • The output of node --version: V10.5.0
  • The version and architecture of your operating system: windows 10 Home 1809
  • Your shell (bash, zsh, PowerShell, cmd, etc.): cmd of VSCode
  • Your browser and version (if running browser tests):
  • Any other third party Mocha related modules (with versions):
  • The code transpiler being used:

Additional Information

master branch

git show --oneline -s
593e9b8 (HEAD -> master, origin/master, origin/HEAD) Add ability to query Mocha version programmatically (#3535)
@plroebuck
Copy link
Contributor

plroebuck commented Nov 14, 2018

Which integration test(s) fail? Specific set (e.g., test.node.integration) from "package-scripts"?

@plroebuck plroebuck added unconfirmed-bug status: waiting for author waiting on response from OP - more information needed area: node.js command-line-or-Node.js-specific labels Nov 14, 2018
@juergba
Copy link
Contributor Author

juergba commented Nov 14, 2018

for example: they all do work with --timeout=2000

  • test\integration\timeout.spec.js
  • test\integration\options.spec.js
  • test\integration\hooks.spec.js
  • test\integration\hook-err.spec.js
  • test\integration\retries.spec.js

@juergba
Copy link
Contributor Author

juergba commented Nov 15, 2018

In mocha.opts timeout is set to 200ms. When I start tests manually some fail because of a timeout error.

@outsideris
Copy link
Contributor

outsideris commented Nov 19, 2018

How did you run tests?
For integration tests, timeout is 5000ms.

@juergba
Copy link
Contributor Author

juergba commented Nov 19, 2018

Yes, running the tests with the package script, then timeout is 5000ms. Running some individual tests/spec files manually as the ones listed above, then timeout is 200ms.

@outsideris
Copy link
Contributor

You can run them with test.node.integration and exclusive-tests.

@outsideris outsideris added status: wontfix typically a feature which won't be added, or a "bug" which is actually intended behavior and removed status: waiting for author waiting on response from OP - more information needed area: node.js command-line-or-Node.js-specific qa labels Nov 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: wontfix typically a feature which won't be added, or a "bug" which is actually intended behavior
Projects
None yet
Development

No branches or pull requests

3 participants