Skip to content

Commit 78cc597

Browse files
committed
Fix flaky test
1 parent 854f3ec commit 78cc597

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

tests/core/state_sync/test_state_sync.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,10 +1309,17 @@ def test_delete_expired_snapshots_batching(
13091309
snapshot_b.snapshot_id,
13101310
}
13111311

1312-
assert state_sync.delete_expired_snapshots() == [
1313-
SnapshotTableCleanupTask(snapshot=snapshot_a.table_info, dev_table_only=False),
1314-
SnapshotTableCleanupTask(snapshot=snapshot_b.table_info, dev_table_only=False),
1315-
]
1312+
deleted_snapshots = state_sync.delete_expired_snapshots()
1313+
assert len(deleted_snapshots) == 2
1314+
1315+
assert (
1316+
SnapshotTableCleanupTask(snapshot=snapshot_a.table_info, dev_table_only=False)
1317+
in deleted_snapshots
1318+
)
1319+
assert (
1320+
SnapshotTableCleanupTask(snapshot=snapshot_b.table_info, dev_table_only=False)
1321+
in deleted_snapshots
1322+
)
13161323

13171324
assert not state_sync.get_snapshots(all_snapshots)
13181325

0 commit comments

Comments
 (0)