copy(server): 刮削原因与登录提示补改;同步数据清理、整理守卫等断言
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Cxwgnn2pbzQ7rXv3rq7fei
This commit is contained in:
1 parent
0019dc1afe
commit
c7a7d7ec2c
8 files changed
+14
-14
No files matched your search
@@ -189,11 +189,11 @@ describe.skipIf(!hasPg)("数据库清理(真实 PG)", () => {
|
||||
expect(Object.fromEntries(preview.map((p) => [p.label, p.rows]))).toEqual({
|
||||
已投递事件: 3,
|
||||
识别尝试: 2,
|
||||
已识别的待识别条目: 1,
|
||||
站点快照: 3,
|
||||
已识别的未识别资源: 1,
|
||||
站点抓取记录: 3,
|
||||
});
|
||||
// 站点快照 3 行、batchSize 2:分两批
|
||||
expect(await run("pipeline")).toBe("已投递事件 3、识别尝试 2、已识别的待识别条目 1、站点快照 3 行已删除");
|
||||
expect(await run("pipeline")).toBe("已投递事件 3、识别尝试 2、已识别的未识别资源 1、站点抓取记录 3 行已删除");
|
||||
|
||||
const types = await sql<{ id: string }>`select type as id from outbox_event`.execute(h.db);
|
||||
expect(types.rows.map((r) => r.id).sort()).toEqual(
|
||||
@@ -225,7 +225,7 @@ describe.skipIf(!hasPg)("数据库清理(真实 PG)", () => {
|
||||
h.db,
|
||||
);
|
||||
const counts = await countRules(h.db, job("pipeline").rules!(ctx()));
|
||||
expect(counts.find((p) => p.label === "站点快照")?.rows).toBe(1);
|
||||
expect(counts.find((p) => p.label === "站点抓取记录")?.rows).toBe(1);
|
||||
});
|
||||
|
||||
it("定时任务登记:流水数据清理每天低峰一次(cron)", () => {
|
||||
|
||||
@@ -251,7 +251,7 @@ describe.skipIf(!hasPg)("CACHE-2 存储(真实 PG)", () => {
|
||||
await cand("r1", "unmatched", 31);
|
||||
await cand("r2", "unmatched", 29);
|
||||
await cand("r3", "ambiguous", 31);
|
||||
expect(await job("identity_pool")(now)).toBe("归档 1 条未识别条目");
|
||||
expect(await job("identity_pool")(now)).toBe("归档 1 条未识别资源");
|
||||
const st = await sql<{ t: string; s: string }>`select sr.title as t, c.status as s from identity_candidate c
|
||||
join source_release sr on sr.id = c.source_release_id order by sr.title`.execute(h.db);
|
||||
expect(st.rows).toEqual([
|
||||
|
||||
Reference in new issue
Block a user