approve: [M11b-4] 3s 轮询兜底 + 端到端时延验证(≤1s)
This commit is contained in:
parent
8eb1e2464a
commit
3e6380a861
@ -50,7 +50,10 @@ _CAPTURED = {'sql': [], 'params': []}
|
||||
|
||||
|
||||
def _row(idx, etype, learner='S01', session='101', blueprint='9', artifact=0,
|
||||
occurred='2026-09-20 10:00:0%d' % (idx % 9), payload=None, source=None):
|
||||
occurred=None, payload=None, source=None):
|
||||
# 默认值不能在签名里引用形参 idx(定义时求值 -> NameError),挪到函数体内。
|
||||
if occurred is None:
|
||||
occurred = '2026-09-20 10:00:%02d' % (idx % 9)
|
||||
return {
|
||||
'id': idx, 'tenant_id': TENANT, 'artifact_id': artifact, 'evidence_type': etype,
|
||||
'source_event_id': source or ('EV%03d' % idx), 'session_id': session,
|
||||
@ -385,8 +388,11 @@ def test_watermark_contract():
|
||||
assert q['watermark']['max_occurred_at'] == '2026-09-21 08:00:00', q['watermark']
|
||||
|
||||
|
||||
# 不能直接对 function 对象排序('<' not supported between functions),
|
||||
# 按函数名排序保证输出顺序稳定可复现。
|
||||
ALL_TESTS = sorted([v for k, v in list(globals().items())
|
||||
if k.startswith('test_') and callable(v)])
|
||||
if k.startswith('test_') and callable(v)],
|
||||
key=lambda fn: fn.__name__)
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user