Azure/azure-event-hubs-node

EPH tests holds onto active timers after all tests finish

jeremymeng opened this issue · 0 comments

Describe the bug
Currently we are passing --exit to mocha when running unit tests. When the option is removed mocha might not exit after all tests passed.

To Reproduce

  • remove --exit from the unit run script
  • npm run unit

Expected behavior
Mocha exits after tests finish.

Package-name: azure-event-processor-host
Package-version: latest source
node.js version: v11.9.0
OS name and version: Ubuntu 18.04.1 LTS

Additional context
It looks like some timers are not released yet when the tests are done. I am not sure yet whether this would be a product issue.

^C[WTF Node?] open handles:
- File descriptors: (note: stdio always exists)
  - fd 1 (tty) (stdio)
  - fd 2 (tty) (stdio)
- Timers:
  - (2700000 ~ 45 min) (anonymous) @ /home/azureuser/git/azure-event-hubs-node/processor/node_modules/@azure/event-hubs/dist/lib/linkEntity.js:76
  - (2700000 ~ 45 min) (anonymous) @ /home/azureuser/git/azure-event-hubs-node/processor/node_modules/@azure/event-hubs/dist/lib/linkEntity.js:76