修复 session-sync 测试的空数据库初始化#618
Open
hanzckernel wants to merge 1 commit intoEKKOLearnAI:mainfrom
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
session-sync 测试在干净 SQLite DB 下的表初始化边界已补齐;这次只改测试 setup,不改运行时同步逻辑。
改动
session-sync.test.ts的 cleanup 前先走initAllStores(),避免 fresh DB 下直接DELETE FROM sessions/messages报no such table。ensureTableimport,并把 startup sync 的断言改成 async await。state.db读取,只验证本地 DB 为空/非空时是否进入同步分支,避免测试依赖本机~/.hermes状态。验证
已通过:
结果:
说明
initAllStores()建表。