From e5f6a13a95a71e08219f6ff8c7fcc4e1a243c67e Mon Sep 17 00:00:00 2001 From: Andrei Balas Date: Mon, 31 Aug 2026 17:04:13 +0300 Subject: [PATCH] fix(ci): adopt asyncio_mode=auto, drop class-level asyncio marks Every Test job since the switch to the managed runner pool failed with BlockingIOError: the pool's log pipe is non-blocking, and pytest's ~1,278-entry warnings summary burst outruns the log reader. ~1,050 of those warnings were a single artifact: class-level @pytest.mark.asyncio on the provider integration classes (needed under strict mode for the async tests inherited from langchain_tests) also landing on every inherited sync test, warned once per parametrized item. Switch to asyncio_mode=auto - the convention already used by uipath-python and uipath-langchain-python - and remove the class-level marks, eliminating the warning flood at its source and shrinking the summary burst ~97%. Co-Authored-By: Claude Fable 5 --- pyproject.toml | 4 ++++ tests/langchain/clients/anthropic/test_integration.py | 1 - tests/langchain/clients/bedrock/test_integration.py | 1 - tests/langchain/clients/google/test_integration.py | 2 -- tests/langchain/clients/litellm/test_integration.py | 2 -- tests/langchain/clients/normalized/test_integration.py | 2 -- tests/langchain/clients/openai/test_integration.py | 2 -- tests/langchain/clients/vertexai/test_integration.py | 1 - 8 files changed, 4 insertions(+), 11 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2db0bdbb..07c3e91e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -114,3 +114,7 @@ skip-magic-trailing-comma = false [tool.pyright] reportImportCycles = true + +[tool.pytest.ini_options] +asyncio_default_fixture_loop_scope = "function" +asyncio_mode = "auto" diff --git a/tests/langchain/clients/anthropic/test_integration.py b/tests/langchain/clients/anthropic/test_integration.py index 661b370e..551ee5bc 100644 --- a/tests/langchain/clients/anthropic/test_integration.py +++ b/tests/langchain/clients/anthropic/test_integration.py @@ -14,7 +14,6 @@ from tests.langchain.integration_tests import UiPathChatModelIntegrationTests -@pytest.mark.asyncio @pytest.mark.vcr class TestAnthropicIntegrationChatModel(UiPathChatModelIntegrationTests): @pytest.fixture(autouse=True) diff --git a/tests/langchain/clients/bedrock/test_integration.py b/tests/langchain/clients/bedrock/test_integration.py index 1d6cbca8..5b58ab10 100644 --- a/tests/langchain/clients/bedrock/test_integration.py +++ b/tests/langchain/clients/bedrock/test_integration.py @@ -15,7 +15,6 @@ from tests.langchain.integration_tests import UiPathChatModelIntegrationTests -@pytest.mark.asyncio @pytest.mark.vcr class TestBedrockIntegrationChatModel(UiPathChatModelIntegrationTests): @pytest.fixture(autouse=True) diff --git a/tests/langchain/clients/google/test_integration.py b/tests/langchain/clients/google/test_integration.py index 2d615848..f362ac44 100644 --- a/tests/langchain/clients/google/test_integration.py +++ b/tests/langchain/clients/google/test_integration.py @@ -11,7 +11,6 @@ from uipath.llm_client.settings import PlatformSettings -@pytest.mark.asyncio @pytest.mark.vcr class TestGoogleIntegrationChatModel(UiPathChatModelIntegrationTests): @pytest.fixture(autouse=True) @@ -48,7 +47,6 @@ def skip_on_specific_configs( pytest.skip(f"Skipping {test_name}: not supported for Gemini models") -@pytest.mark.asyncio @pytest.mark.vcr class TestGoogleIntegrationEmbeddings(EmbeddingsIntegrationTests): @pytest.fixture(autouse=True) diff --git a/tests/langchain/clients/litellm/test_integration.py b/tests/langchain/clients/litellm/test_integration.py index 64dc87f1..5ba44135 100644 --- a/tests/langchain/clients/litellm/test_integration.py +++ b/tests/langchain/clients/litellm/test_integration.py @@ -13,7 +13,6 @@ from tests.langchain.integration_tests import UiPathChatModelIntegrationTests -@pytest.mark.asyncio @pytest.mark.vcr class TestLiteLLMIntegrationChatModel(UiPathChatModelIntegrationTests): @property @@ -125,7 +124,6 @@ def skip_on_specific_configs( ) -@pytest.mark.asyncio @pytest.mark.vcr class TestLiteLLMIntegrationEmbeddings(EmbeddingsIntegrationTests): @pytest.fixture(autouse=True) diff --git a/tests/langchain/clients/normalized/test_integration.py b/tests/langchain/clients/normalized/test_integration.py index b7992e41..bf5a59ff 100644 --- a/tests/langchain/clients/normalized/test_integration.py +++ b/tests/langchain/clients/normalized/test_integration.py @@ -17,7 +17,6 @@ from uipath.llm_client.settings import PlatformSettings -@pytest.mark.asyncio @pytest.mark.vcr class TestNormalizedIntegrationChatModel(UiPathChatModelIntegrationTests): @pytest.fixture(autouse=True) @@ -172,7 +171,6 @@ async def test_parallel_and_sequential_tool_calling_async(self, model: BaseChatM pytest.skip("Parallel tool calling is not supported for normalized API") -@pytest.mark.asyncio @pytest.mark.vcr class TestNormalizedIntegrationEmbeddings(EmbeddingsIntegrationTests): @pytest.fixture(autouse=True) diff --git a/tests/langchain/clients/openai/test_integration.py b/tests/langchain/clients/openai/test_integration.py index be9d23f9..02f3f334 100644 --- a/tests/langchain/clients/openai/test_integration.py +++ b/tests/langchain/clients/openai/test_integration.py @@ -11,7 +11,6 @@ from tests.langchain.integration_tests import UiPathChatModelIntegrationTests -@pytest.mark.asyncio @pytest.mark.vcr class TestOpenAIIntegrationChatModel(UiPathChatModelIntegrationTests): @pytest.fixture(autouse=True) @@ -49,7 +48,6 @@ def skip_on_specific_configs( pytest.skip("PDF inputs require the OpenAI Responses API") -@pytest.mark.asyncio @pytest.mark.vcr class TestOpenAIIntegrationEmbeddings(EmbeddingsIntegrationTests): @pytest.fixture(autouse=True) diff --git a/tests/langchain/clients/vertexai/test_integration.py b/tests/langchain/clients/vertexai/test_integration.py index fb8c55cc..363240f9 100644 --- a/tests/langchain/clients/vertexai/test_integration.py +++ b/tests/langchain/clients/vertexai/test_integration.py @@ -10,7 +10,6 @@ from tests.langchain.integration_tests import UiPathChatModelIntegrationTests -@pytest.mark.asyncio @pytest.mark.vcr class TestVertexAIIntegrationChatModel(UiPathChatModelIntegrationTests): @pytest.fixture(autouse=True)