diff --git a/tests/integration/test_docker.py b/tests/integration/test_docker.py index 1c4af60..722e9ef 100644 --- a/tests/integration/test_docker.py +++ b/tests/integration/test_docker.py @@ -267,6 +267,8 @@ def test_disk_usage_persisted(app): "FROM docker_disk_usage WHERE host_id=:h"), {"h": hid})).first() img_count = (await s.execute(text( "SELECT COUNT(*) FROM docker_images WHERE host_id=:h"), {"h": hid})).scalar() + # End the autobegun read transaction before opening the next write one. + await s.rollback() # Re-report with one image dropped — the stale row must be pruned. async with s.begin(): await persist(s, await s.get(Host, hid), [], None, disk2)