diff --git a/tests/end_to_end/test_scenarios.py b/tests/end_to_end/test_scenarios.py index 22b991a175..bc5b89a34e 100644 --- a/tests/end_to_end/test_scenarios.py +++ b/tests/end_to_end/test_scenarios.py @@ -27,6 +27,13 @@ CONFIG_FILE = Path(__file__).parent / "test_config.yaml" +#: Read timeout for the ``pyrit_scan`` client, in seconds. Starting a scenario is a single +#: request that runs the initializers, resolves the target and builds the scenario before the +#: server responds; loading the default datasets alone measures around three minutes, so the +#: client default of 60 seconds always expires. The resulting ``ReadTimeout`` stringifies to +#: nothing, so the failure surfaces only as an empty "Error starting scenario:" message. +REQUEST_TIMEOUT_SECONDS = 300 + #: Initializers run for every scenario unless overridden in ``SCENARIO_INITIALIZERS``. #: ``target`` populates ``TargetRegistry`` from env vars; ``load_default_datasets`` #: fetches each scenario's declared default datasets into memory. @@ -91,6 +98,8 @@ def test_scenario_with_pyrit_scan(scenario_name): "openai_chat", "--config-file", str(CONFIG_FILE), + "--request-timeout", + str(REQUEST_TIMEOUT_SECONDS), "--max-dataset-size", "1", "--log-level",