From 39123f840714090b97b09cea515277dcf8bcbd0f Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Sun, 1 Dec 2024 17:22:29 +0000 Subject: [PATCH] lsp: Stop suppressing TimeoutError --- lib/esbonio/tests/e2e/conftest.py | 6 +----- lib/esbonio/tests/e2e/test_e2e_diagnostics.py | 6 +----- lib/esbonio/tests/server/conftest.py | 6 +----- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/lib/esbonio/tests/e2e/conftest.py b/lib/esbonio/tests/e2e/conftest.py index 4000ef38c..dfb347dcb 100644 --- a/lib/esbonio/tests/e2e/conftest.py +++ b/lib/esbonio/tests/e2e/conftest.py @@ -86,8 +86,4 @@ async def client(lsp_client: LanguageClient, uri_for, tmp_path_factory): yield # Teardown - try: - await asyncio.wait_for(lsp_client.shutdown_session(), timeout=2.0) - except (asyncio.TimeoutError, TimeoutError): - # HACK: Working around openlawlibrary/pygls#433 - print("Gave up waiting for process to exit") + await asyncio.wait_for(lsp_client.shutdown_session(), timeout=2.0) diff --git a/lib/esbonio/tests/e2e/test_e2e_diagnostics.py b/lib/esbonio/tests/e2e/test_e2e_diagnostics.py index 01a62b652..6cb1da352 100644 --- a/lib/esbonio/tests/e2e/test_e2e_diagnostics.py +++ b/lib/esbonio/tests/e2e/test_e2e_diagnostics.py @@ -172,11 +172,7 @@ async def pub_client(lsp_client: LanguageClient, uri_for, tmp_path_factory): yield # Teardown - try: - await asyncio.wait_for(lsp_client.shutdown_session(), timeout=2.0) - except (asyncio.TimeoutError, TimeoutError): - # HACK: Working around openlawlibrary/pygls#433 - print("Gave up waiting for process to exit") + await asyncio.wait_for(lsp_client.shutdown_session(), timeout=2.0) @pytest.mark.asyncio(loop_scope="module") diff --git a/lib/esbonio/tests/server/conftest.py b/lib/esbonio/tests/server/conftest.py index d9f1062c9..1c4f3998f 100644 --- a/lib/esbonio/tests/server/conftest.py +++ b/lib/esbonio/tests/server/conftest.py @@ -41,8 +41,4 @@ async def client(request, uri_for, lsp_client: LanguageClient): yield # Teardown - try: - await asyncio.wait_for(lsp_client.shutdown_session(), timeout=2.0) - except (asyncio.TimeoutError, TimeoutError): - # HACK: Working around openlawlibrary/pygls#433 - print("Gave up waiting for process to exit") + await asyncio.wait_for(lsp_client.shutdown_session(), timeout=2.0)