Azure / azure-event-hubs-node

Node client library for Azure Event Hubs https://azure.microsoft.com/services/event-hubs
MIT License
50 stars 44 forks source link

EPH tests holds onto active timers after all tests finish #188

Closed jeremymeng closed 5 years ago

jeremymeng commented 5 years ago

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

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