feat(tplus): 新增 T+ 只读同步服务与同步管理
This commit is contained in:
1 parent
78bef43c06
commit
4fe5916c2c
43 files changed
+3309
-388
No files matched your search
@@ -0,0 +1,21 @@
|
||||
"""持久化任务需要完整的幂等和重试证据,不能只有运行中的内存对象。"""
|
||||
|
||||
from app.models import TPlusSyncBatch
|
||||
|
||||
|
||||
def test_批次记录范围重试幂等与报告():
|
||||
table = TPlusSyncBatch.__table__
|
||||
assert {
|
||||
"entity_types_json",
|
||||
"skipped_record_count",
|
||||
"parent_batch_no",
|
||||
"request_key",
|
||||
"requested_by",
|
||||
"audit_result_json",
|
||||
} <= set(table.c.keys())
|
||||
assert table.c.started_at.nullable is True
|
||||
|
||||
|
||||
def test_请求键由数据库唯一约束保护():
|
||||
constraints = TPlusSyncBatch.__table__.constraints
|
||||
assert any(c.name == "uk_tplus_sync_batches_request_key" for c in constraints)
|
||||
Reference in new issue
Block a user