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

Regression in timeout handling and --inspect-brk #4110

Closed
3 of 4 tasks
alexjeffburke opened this issue Nov 27, 2019 · 1 comment · Fixed by #4125
Closed
3 of 4 tasks

Regression in timeout handling and --inspect-brk #4110

alexjeffburke opened this issue Nov 27, 2019 · 1 comment · Fixed by #4125
Labels
area: node.js command-line-or-Node.js-specific type: bug a defect, confirmed by a maintainer

Comments

@alexjeffburke
Copy link

alexjeffburke commented Nov 27, 2019

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 that you not install Mocha globally.

Description

Around the mocha 4 timeframe there was a change that landed to disable all timeouts while mocha was being debugged. This worked up through mocha 5.2.0 but, I believe, may have regressed in mocha 6.

Steps to Reproduce

I think this is primarily related to tests containing async code. Being paused somewhere within an async codepath I see the test being marked as failed due to the timeout while I'm still paused inside the code being tested.

Expected behavior:
The timeout is disabled when in --inspect-brk mode to allow the mocha process to be debugged without tests failing due to timeout.

Actual behavior:
An extra command line option, -t 0 , must be specified to force the timeout to be disabled.

Versions

  • The output of mocha --version and node node_modules/.bin/mocha --version: 6.2.2
  • The output of node --version: 10.10.0
  • Your operating system
    • name and version: macOS 10.14.6
    • architecture (32 or 64-bit): 64bit
  • Your shell (e.g., bash, zsh, PowerShell, cmd): bash
@juergba juergba added type: bug a defect, confirmed by a maintainer area: node.js command-line-or-Node.js-specific and removed unconfirmed-bug labels Dec 12, 2019
@juergba
Copy link
Contributor

juergba commented Dec 15, 2019

@alexjeffburke thank you for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: node.js command-line-or-Node.js-specific type: bug a defect, confirmed by a maintainer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants