Skip to content

Commit a8742bd

Browse files
committed
extend test
1 parent 47ea790 commit a8742bd

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

sqlmesh/core/state_sync/db/snapshot.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ def _get_expired_snapshots(
241241
exp.Select, expired_query.or_(exp.column("kind_name").eq(ModelKindName.VIEW))
242242
)
243243

244+
candidates = {}
244245
if ignore_ttl or expired_record_count > 0:
245246
candidates = {
246247
SnapshotId(name=name, identifier=identifier): SnapshotNameVersion(

tests/core/state_sync/test_state_sync.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,6 +1129,8 @@ def test_get_expired_snapshots_includes_downstream_view_snapshots(
11291129
):
11301130
now_ts = now_timestamp()
11311131

1132+
assert len(state_sync.get_expired_snapshots(now_ts)) == 0
1133+
11321134
# model_a: table snapshot
11331135
snapshot_a = make_snapshot(
11341136
SqlModel(

0 commit comments

Comments
 (0)