From c17c44b5bb43c81c0a1293f8ff0162f1270060d1 Mon Sep 17 00:00:00 2001 From: Jan Michael Auer Date: Mon, 15 Dec 2025 11:08:06 +0100 Subject: [PATCH] fix(python): Set timeout correctly and update test --- clients/python/src/objectstore_client/client.py | 2 +- clients/python/tests/test_e2e.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/clients/python/src/objectstore_client/client.py b/clients/python/src/objectstore_client/client.py index cdd4955d..6253d7d3 100644 --- a/clients/python/src/objectstore_client/client.py +++ b/clients/python/src/objectstore_client/client.py @@ -113,7 +113,7 @@ def __init__( if timeout_ms: connection_kwargs_to_use["timeout"] = urllib3.Timeout( - connect=timeout_ms * 100, read=timeout_ms * 100 + connect=timeout_ms / 1000, read=timeout_ms / 1000 ) if connection_kwargs: diff --git a/clients/python/tests/test_e2e.py b/clients/python/tests/test_e2e.py index 90d06b3f..1290073f 100644 --- a/clients/python/tests/test_e2e.py +++ b/clients/python/tests/test_e2e.py @@ -157,9 +157,7 @@ def test_connect_timeout() -> None: addr = s.getsockname() url = f"http://127.0.0.1:{addr[1]}" - timeout = urllib3.Timeout(connect=0.05, read=0.05) # 50ms - - client = Client(url, connection_kwargs={"timeout": timeout}) + client = Client(url, timeout_ms=50) test_usecase = Usecase( "test-usecase", compression="zstd",