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 test hangs mocha #721

Closed
raineorshine opened this issue Aug 15, 2020 · 0 comments · Fixed by #1248
Closed

Timeout test hangs mocha #721

raineorshine opened this issue Aug 15, 2020 · 0 comments · Fixed by #1248

Comments

@raineorshine
Copy link
Owner

raineorshine commented Aug 15, 2020

Test should throw an exception when timeout is exceeded hangs due to open socket/connection. Eventually the test times out and passes due to successful assertions, but there is a long delay that slows down test completion.

  • When --timeout outraces getAnalysis, the calls to minipass-fetch (via latest) remain open.
  • this.timeout(1000) does not make a difference

References:

Output from https://github.com/myndzi/wtfnode:

> npm-check-updates@7.1.1 test /Users/raine/projects/npm-check-updates
> npm run lint && npm run mocha


> npm-check-updates@7.1.1 lint /Users/raine/projects/npm-check-updates
> eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives .


> npm-check-updates@7.1.1 mocha /Users/raine/projects/npm-check-updates
> mocha test test/package-managers/npm test/package-managers/yarn



  run
latest @angular/bazel
    1) should throw an exception instead of printing to the console when timeout is exceeded
[WTF Node?] open handles:
- File descriptors: (note: stdio always exists)
  - fd 2 (tty) (stdio)
  - fd 1 (tty) (stdio)
  - fd 0 (tty)
- Sockets:
  - fd -1
    - Listeners:
      - connect: createConnection @ /Users/raine/projects/npm-check-updates/node_modules/agentkeepalive/lib/https_agent.js:29
Unable to determine callsite for "Function". Did you require `wtfnode` at the top of your entry point?
      - connect: (anonymous) @ unknown:0
Unable to determine callsite for "connect". Did you require `wtfnode` at the top of your entry point?
      - connect: connect @ unknown:0
  - fd -1
    - Listeners:
      - connect: createConnection @ /Users/raine/projects/npm-check-updates/node_modules/agentkeepalive/lib/https_agent.js:29
Unable to determine callsite for "Function". Did you require `wtfnode` at the top of your entry point?
      - connect: (anonymous) @ unknown:0
Unable to determine callsite for "connect". Did you require `wtfnode` at the top of your entry point?
      - connect: connect @ unknown:0
  - fd -1
    - Listeners:
      - connect: createConnection @ /Users/raine/projects/npm-check-updates/node_modules/agentkeepalive/lib/https_agent.js:29
Unable to determine callsite for "Function". Did you require `wtfnode` at the top of your entry point?
      - connect: (anonymous) @ unknown:0
Unable to determine callsite for "connect". Did you require `wtfnode` at the top of your entry point?
      - connect: connect @ unknown:0
  - fd -1
    - Listeners:
      - connect: createConnection @ /Users/raine/projects/npm-check-updates/node_modules/agentkeepalive/lib/https_agent.js:29
Unable to determine callsite for "Function". Did you require `wtfnode` at the top of your entry point?
      - connect: (anonymous) @ unknown:0
Unable to determine callsite for "connect". Did you require `wtfnode` at the top of your entry point?
      - connect: connect @ unknown:0
  - fd -1
    - Listeners:
      - connect: createConnection @ /Users/raine/projects/npm-check-updates/node_modules/agentkeepalive/lib/https_agent.js:29
Unable to determine callsite for "Function". Did you require `wtfnode` at the top of your entry point?
      - connect: (anonymous) @ unknown:0
Unable to determine callsite for "connect". Did you require `wtfnode` at the top of your entry point?
      - connect: connect @ unknown:0
  - fd -1
    - Listeners:
      - connect: createConnection @ /Users/raine/projects/npm-check-updates/node_modules/agentkeepalive/lib/https_agent.js:29
Unable to determine callsite for "Function". Did you require `wtfnode` at the top of your entry point?
      - connect: (anonymous) @ unknown:0
Unable to determine callsite for "connect". Did you require `wtfnode` at the top of your entry point?
      - connect: connect @ unknown:0
  - fd -1
    - Listeners:
      - connect: createConnection @ /Users/raine/projects/npm-check-updates/node_modules/agentkeepalive/lib/https_agent.js:29
Unable to determine callsite for "Function". Did you require `wtfnode` at the top of your entry point?
      - connect: (anonymous) @ unknown:0
Unable to determine callsite for "connect". Did you require `wtfnode` at the top of your entry point?
      - connect: connect @ unknown:0
  - fd -1
    - Listeners:
      - connect: createConnection @ /Users/raine/projects/npm-check-updates/node_modules/agentkeepalive/lib/https_agent.js:29
Unable to determine callsite for "Function". Did you require `wtfnode` at the top of your entry point?
      - connect: (anonymous) @ unknown:0
Unable to determine callsite for "connect". Did you require `wtfnode` at the top of your entry point?
      - connect: connect @ unknown:0
- Timers:
  - (10 ~ 10 ms) (anonymous) @ /Users/raine/projects/npm-check-updates/node_modules/minipass-fetch/lib/index.js:88
  - (10 ~ 10 ms) (anonymous) @ /Users/raine/projects/npm-check-updates/node_modules/minipass-fetch/lib/index.js:88
  - (10 ~ 10 ms) (anonymous) @ /Users/raine/projects/npm-check-updates/node_modules/minipass-fetch/lib/index.js:88
  - (10 ~ 10 ms) (anonymous) @ /Users/raine/projects/npm-check-updates/node_modules/minipass-fetch/lib/index.js:88
  - (10 ~ 10 ms) (anonymous) @ /Users/raine/projects/npm-check-updates/node_modules/minipass-fetch/lib/index.js:88
  - (10 ~ 10 ms) (anonymous) @ /Users/raine/projects/npm-check-updates/node_modules/minipass-fetch/lib/index.js:88
  - (10 ~ 10 ms) (anonymous) @ /Users/raine/projects/npm-check-updates/node_modules/minipass-fetch/lib/index.js:88
  - (10 ~ 10 ms) (anonymous) @ /Users/raine/projects/npm-check-updates/node_modules/minipass-fetch/lib/index.js:88
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.

1 participant