I am using DebugClient in some unit tests, and noticed that my test runner (mocha) took some time to exit after the tests completed successfully. I traced it to this timer in DebugClient.waitForEvent. It is never cancelled, so the node process waits for it to expire before exiting.
Ideally, it would be cancelled when the event is received and the promise is resolved. I can't sign the CLA required to contribute to this repository, so I can't contribute a patch, but the changes required are very simple.
I am using DebugClient in some unit tests, and noticed that my test runner (mocha) took some time to exit after the tests completed successfully. I traced it to this timer in
DebugClient.waitForEvent
. It is never cancelled, so the node process waits for it to expire before exiting.https://github.com/Microsoft/vscode-debugadapter-node/blob/64665fe18a0316b2a871df4b36cff214c28d2598/testSupport/src/debugClient.ts#L292-L299
Ideally, it would be cancelled when the event is received and the promise is resolved. I can't sign the CLA required to contribute to this repository, so I can't contribute a patch, but the changes required are very simple.