From bf59cd830c6a5ffd1169e7cc68f105a344c1b1c5 Mon Sep 17 00:00:00 2001 From: Albrecht Degering Date: Wed, 22 Jul 2026 03:21:20 +0200 Subject: [PATCH] test(calendar): commit retirement before engine inspection --- tests/test_caldav.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_caldav.py b/tests/test_caldav.py index 7bacdf5..a959a7c 100644 --- a/tests/test_caldav.py +++ b/tests/test_caldav.py @@ -828,6 +828,11 @@ class CalDAVSyncTests(unittest.TestCase): assert plan.destroy_data_executor is not None with patch("govoplan_calendar.backend.service.audit_event") as audit: plan.destroy_data_executor(session, "calendar") + # Retirement intentionally participates in the caller's database + # transaction. Commit before inspecting through a new Engine + # connection; otherwise SQLite rolls back the uncommitted DDL when + # the temporary inspector connection is returned to the pool. + session.commit() self.assertEqual(provider.deleted, [provider_ref]) self.assertEqual(provider.values, {})