microsoft / microsoft/vscode-debugadapter-node
Need to clear timeout in DebugClient.waitForEvent
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 306
- Forks
- 90
- Avg merge
- 8h 36m
- Merged PRs (30d)
- 3
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect testSupport/src/debugClient.ts at the DebugClient.waitForEvent timer around lines 292-299. Run the relevant unit tests with mocha and verify that receiving the event cancels the timer, resolves the promise, and lets the Node process exit without waiting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 58/100