diff --git a/python/python/tests/conftest.py b/python/python/tests/conftest.py index b2a97b4d0a..9ad3ee6355 100644 --- a/python/python/tests/conftest.py +++ b/python/python/tests/conftest.py @@ -224,6 +224,22 @@ async def glide_client( await client.close() +@pytest.fixture(scope="function") +async def glide_client( + request, + cluster_mode: bool, + protocol: ProtocolVersion, + request_timeout: int, +) -> AsyncGenerator[TGlideClient, None]: + "Get async socket client for tests" + client = await create_client( + request, cluster_mode, protocol=protocol, request_timeout=request_timeout + ) + yield client + await test_teardown(request, cluster_mode, protocol) + await client.close() + + @pytest.fixture(scope="function") async def management_client( request, @@ -237,6 +253,22 @@ async def management_client( await client.close() +@pytest.fixture(scope="function") +async def management_client( + request, + cluster_mode: bool, + protocol: ProtocolVersion, + request_timeout: int, +) -> AsyncGenerator[TGlideClient, None]: + "Get async socket client for tests, used to manage the state when tests are on the client ability to connect" + client = await create_client( + request, cluster_mode, protocol=protocol, request_timeout=request_timeout + ) + yield client + await test_teardown(request, cluster_mode, protocol) + await client.close() + + async def create_client( request, cluster_mode: bool, diff --git a/python/python/tests/test_auth.py b/python/python/tests/test_auth.py index 7e3fc67851..612c04786f 100644 --- a/python/python/tests/test_auth.py +++ b/python/python/tests/test_auth.py @@ -36,6 +36,7 @@ async def cleanup(self, request, management_client: TGlideClient): @pytest.mark.parametrize("cluster_mode", [True]) @pytest.mark.parametrize("protocol", [ProtocolVersion.RESP2, ProtocolVersion.RESP3]) + @pytest.mark.parametrize("request_timeout", [3000]) async def test_update_connection_password( self, glide_client: TGlideClient, management_client: TGlideClient ):