microsoft / microsoft/vscode-languageserver-node
Testing `textDocument/didClose` in extensions requires a three minute timeout
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.8k
- Forks
- 404
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 14
Description
When opening a file in tests using vscode.workspace.openTextDocument followed by vscode.window.showTextDocument and closing it again using workbench.action.closeAllEditors or workbench.action.closeActiveEditor, a textDocument/didClose notification is not fired until three minutes have passed since the file was opened. I assume this happens for the same reason as the three minute timeout in #652.
While it's possible to test functionality that depends on a didClose notification with a three minute pause, it's not ideal. Is there a way to open (or close) files in extension tests that fires the notification sooner?
In case it helps, I've also put together a small reproducer. Just compare the behavior of manually opening foo.txt in the file tree and closing it after the language server has started with what the test does.
Tested on VS Code version 1.70.2.
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
Start with the extension-test sequence using vscode.workspace.openTextDocument, vscode.window.showTextDocument, and workbench.action.closeAllEditors or workbench.action.closeActiveEditor. Compare it with the manual workflow described in the issue and inspect the linked didClose reproducer. Done means an extension test can trigger textDocument/didClose without waiting three minutes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- developer-experience, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100