SolidLanguageServer: Rename method start_server to start_server_context for clarity and apply it in conftest

This commit is contained in:
Dominik Jain authored and Dominik Jain committed 2026-05-11 09:52:53 +02:00
1 parent 424cd34582
commit 89d786f799
3 files changed
+3 -17

No files matched your search

+1 -15
View File
@@ -103,22 +103,8 @@ def start_ls_context(
language, repo_path, ignored_paths, trace_lsp_communication, ls_specific_settings, additional_workspace_folders, solidlsp_dir
)
log.info(f"Starting language server for {language} {repo_path}")
ls.start()
try:
log.info(f"Language server started for {language} {repo_path}")
with ls.start_server_context():
yield ls
finally:
log.info(f"Stopping language server for {language} {repo_path}")
try:
ls.stop(shutdown_timeout=5)
except Exception as e:
log.warning(f"Warning: Error stopping language server: {e}")
# try to force cleanup
if hasattr(ls, "server") and hasattr(ls.server, "process"):
try:
ls.server.process.terminate()
except:
pass
@contextmanager