fix(storage): finish SQLite transactions before propagating cancellation

This commit is contained in:
Eric Wang
2026-10-26 16:50:57 +08:00
parent d8d48c26a3
commit e6a96ed135
8 changed files with 288 additions and 6 deletions
@@ -6,6 +6,7 @@ from uuid import uuid4
import pytest
from src.core.config import Config
from langgraph.checkpoint.sqlite.aio import AsyncSqliteSaver
from src.storage.runtime import StorageSettings, open_storage
from .test_persistence import run
@@ -36,7 +37,7 @@ def test_sqlite_requires_migration_and_does_not_fall_back(tmp_path):
pytest.fail('Uninitialized durable storage must not start')
async with open_storage(replace(config,auto_migrate=True)): pass
async with open_storage(config) as runtime:
assert runtime.checkpointer.__class__.__name__=='AsyncSqliteSaver'
assert isinstance(runtime.checkpointer, AsyncSqliteSaver)
run(scenario())