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