This is an automated email from the ASF dual-hosted git repository.
EnxDev pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 83731ce7b3a test(reports): freeze the clock in the stale retry
boundary test (#44651)
83731ce7b3a is described below
commit 83731ce7b3ae331249fa5a66a4a87a56844035d0
Author: Enzo Martellucci <[email protected]>
AuthorDate: Fri Sep 25 14:40:12 2026 +0200
test(reports): freeze the clock in the stale retry boundary test (#44651)
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
---
tests/unit_tests/commands/report/execution_claim_test.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/unit_tests/commands/report/execution_claim_test.py
b/tests/unit_tests/commands/report/execution_claim_test.py
index 7baadc9314a..c747f07b236 100644
--- a/tests/unit_tests/commands/report/execution_claim_test.py
+++ b/tests/unit_tests/commands/report/execution_claim_test.py
@@ -27,6 +27,7 @@ from uuid import uuid4
import pytest
import sqlalchemy as sa
+from freezegun import freeze_time
from pytest_mock import MockerFixture
from sqlalchemy.orm import sessionmaker
@@ -391,7 +392,9 @@ def test_stale_retry_recovers_at_max_delay(
) -> None:
"""Admission must not add the execution budget to the retry recovery
delay."""
now = utc_now().replace(microsecond=0)
- with sessions() as session:
+ # Freeze the clock the claim measures staleness against, so the ages sit
one
+ # second either side of the delay however long the test takes to run.
+ with freeze_time(now), sessions() as session:
schedule = session.query(ReportSchedule).one()
schedule.last_state = ReportState.RETRYING
schedule.execution_owner = "owner"