From 749da16707f2865e017c887ddf5400da09ffd998 Mon Sep 17 00:00:00 2001 From: chengke <404835780@qq.com> Date: Fri, 4 Dec 2026 04:52:04 -0800 Subject: [PATCH] Give the execution-timeout test a budget a slow runner can reach the native wait in The 0.08s execution budget also covers the database work before the native wait. On a slow CI runner the deadline fired before the wait began, so the fake native call never ran. A one second budget still ends the twenty second wait early and keeps the test about one second long. Co-Authored-By: Claude Sonnet 5.5 --- apps/api/tests/contract/test_indexing_execution_contract.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/api/tests/contract/test_indexing_execution_contract.py b/apps/api/tests/contract/test_indexing_execution_contract.py index 125c9ca48..241c898c1 100644 --- a/apps/api/tests/contract/test_indexing_execution_contract.py +++ b/apps/api/tests/contract/test_indexing_execution_contract.py @@ -204,7 +204,9 @@ def test_execution_timeout_stops_native_wait_and_returns_without_replay( engine, jobId = parsedRuntime calls: list[str] = [] - executionBudget: float = float(os.environ.get("KNOWHERE_TEST_SHORT_INDEXING_TIMEOUT_SECONDS", "0.08")) + # The budget also covers the database work before the native wait starts. It must be long enough + # for a slow runner to reach the wait, and far shorter than the wait itself. + executionBudget: float = float(os.environ.get("KNOWHERE_TEST_SHORT_INDEXING_TIMEOUT_SECONDS", "1")) from shared.services.retrieval.lexical.runtime import OpenSearchRuntime from types import SimpleNamespace # The RPC is fake; omit unrelated cold TLS/client initialization so this