Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions tests/end_to_end/test_scenarios.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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",
Expand Down