From bc07b3eead4c9999de94d3bacef7e59c96e3ccb9 Mon Sep 17 00:00:00 2001 From: ro-mo-do Date: Mon, 29 Jun 2026 11:30:58 -0500 Subject: [PATCH 1/2] Increase sf CLI timeout from 30s to 120s sf org display on sandbox orgs can take 30-60 seconds, which causes a TimeoutExpired error with the current hardcoded 30s limit. 120s is a conservative value that accommodates slow sandbox connections while still failing fast on genuine hangs. --- src/datacustomcode/token_provider.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/datacustomcode/token_provider.py b/src/datacustomcode/token_provider.py index 981aebf..856dafe 100644 --- a/src/datacustomcode/token_provider.py +++ b/src/datacustomcode/token_provider.py @@ -108,7 +108,7 @@ def _run_sf_command(args: list[str], description: str) -> dict: capture_output=True, text=True, check=True, - timeout=30, + timeout=120, ) except FileNotFoundError as exc: raise RuntimeError( From 0073ca0542691dd4107c340d27f059560d8bba28 Mon Sep 17 00:00:00 2001 From: ro-mo-do Date: Tue, 7 Jul 2026 07:54:37 -0500 Subject: [PATCH 2/2] Fix test assertions to match increased timeout Update `test_returns_token_and_instance_url` to expect `timeout=120` instead of `timeout=30`, matching the change in _run_sf_command. Co-Authored-By: Claude Sonnet 4.6 --- tests/io/reader/test_sf_cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/io/reader/test_sf_cli.py b/tests/io/reader/test_sf_cli.py index eca3a56..a225514 100644 --- a/tests/io/reader/test_sf_cli.py +++ b/tests/io/reader/test_sf_cli.py @@ -99,7 +99,7 @@ def test_returns_token_and_instance_url(self, reader): capture_output=True, text=True, check=True, - timeout=30, + timeout=120, ) mock_run.assert_any_call( [ @@ -114,7 +114,7 @@ def test_returns_token_and_instance_url(self, reader): capture_output=True, text=True, check=True, - timeout=30, + timeout=120, ) def test_file_not_found_raises_runtime_error(self, reader):