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.
When opening a file in tests using
vscode.workspace.openTextDocumentfollowed byvscode.window.showTextDocumentand closing it again usingworkbench.action.closeAllEditorsorworkbench.action.closeActiveEditor, atextDocument/didClosenotification 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
didClosenotification 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.txtin 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.