test(integration): give daily tag spend retention tests a 240s timeout

Each node boots a proxy and waits for a whole-minute cleanup cron tick, so the global 90s pytest-timeout can expire during teardown on a slow runner, as integration-accounting did on pipeline 90302

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
yucheng 2026-09-24 18:50:17 +00:00
parent 755f3e4042
commit 4bd8117f8e

View file

@ -119,6 +119,7 @@ def _cleanup_config(tmp_path: Path, retention: dict[str, JsonValue]) -> Path:
return path
@pytest.mark.timeout(240)
@pytest.mark.covers("spend.daily_tag_spend.retention_prunes_rows_older_than_the_period_and_keeps_the_rest")
def test_daily_tag_spend_retention_prunes_only_rows_older_than_the_period(gateway: Gateway, tmp_path: Path) -> None:
tag: Final = f"integration-retention-{uuid.uuid4().hex}"
@ -137,6 +138,7 @@ def test_daily_tag_spend_retention_prunes_only_rows_older_than_the_period(gatewa
_delete_daily_tag_spend(tag)
@pytest.mark.timeout(240)
@pytest.mark.covers("spend.daily_tag_spend.runtime_config_update_enables_cleanup_on_a_multi_worker_proxy")
def test_config_update_turns_on_daily_tag_spend_cleanup_without_a_restart(gateway: Gateway, tmp_path: Path) -> None:
tag: Final = f"integration-retention-{uuid.uuid4().hex}"
@ -163,6 +165,7 @@ def test_config_update_turns_on_daily_tag_spend_cleanup_without_a_restart(gatewa
_delete_daily_tag_spend(tag)
@pytest.mark.timeout(240)
@pytest.mark.covers("spend.daily_tag_spend.invalid_retention_value_keeps_rows_and_leaves_the_proxy_serving")
def test_unparseable_daily_tag_spend_retention_deletes_nothing_and_keeps_serving(
gateway: Gateway, tmp_path: Path
@ -185,6 +188,7 @@ def test_unparseable_daily_tag_spend_retention_deletes_nothing_and_keeps_serving
_delete_daily_tag_spend(tag)
@pytest.mark.timeout(240)
@pytest.mark.covers("spend.daily_tag_spend.retention_horizon_is_independent_of_the_spend_log_horizon")
def test_daily_tag_spend_keeps_days_the_shorter_spend_log_horizon_already_pruned(
gateway: Gateway, tmp_path: Path
@ -206,6 +210,7 @@ def test_daily_tag_spend_keeps_days_the_shorter_spend_log_horizon_already_pruned
_delete_daily_tag_spend(tag)
@pytest.mark.timeout(240)
@pytest.mark.covers("spend.daily_tag_spend.cleanup_and_serving_survive_losing_one_of_two_workers")
def test_daily_tag_spend_cleanup_completes_after_one_of_two_workers_is_killed(gateway: Gateway, tmp_path: Path) -> None:
tag: Final = f"integration-retention-{uuid.uuid4().hex}"
@ -231,6 +236,7 @@ def test_daily_tag_spend_cleanup_completes_after_one_of_two_workers_is_killed(ga
_delete_daily_tag_spend(tag)
@pytest.mark.timeout(240)
@pytest.mark.covers("spend.daily_tag_spend.unset_retention_never_deletes_even_while_spend_logs_are_pruned")
def test_daily_tag_spend_is_kept_forever_when_its_retention_is_unset(gateway: Gateway, tmp_path: Path) -> None:
tag: Final = f"integration-retention-{uuid.uuid4().hex}"