优化
This commit is contained in:
@@ -35,13 +35,13 @@ test('completion failure exposes a readable stage and retry entry', () => {
|
||||
})
|
||||
})
|
||||
|
||||
test('retry reuses the original operation id with the latest server version and command facts', () => {
|
||||
test('retry reuses the original operation id and request-hashed task version', () => {
|
||||
const attempt = refreshCompletionAttempt(
|
||||
{ operationId: 'complete-task-8-v3', expectedTaskVersion: 3, commandId: 'cmd-old' },
|
||||
{ taskVersion: 7, commandId: 'cmd-latest', commandStatus: 'COMPLETION_FAILED' }
|
||||
)
|
||||
assert.equal(attempt.operationId, 'complete-task-8-v3')
|
||||
assert.equal(attempt.expectedTaskVersion, 7)
|
||||
assert.equal(attempt.expectedTaskVersion, 3)
|
||||
assert.equal(attempt.commandId, 'cmd-latest')
|
||||
assert.throws(() => refreshCompletionAttempt({}, { taskVersion: 7 }), /缺少原完成操作标识/)
|
||||
assert.throws(() => refreshCompletionAttempt({ operationId: 'stable-id' }), /缺少服务端最新任务版本/)
|
||||
@@ -59,4 +59,3 @@ test('completed facts win over stale processing facts', () => {
|
||||
assert.equal(phase, COMPLETION_PHASE.COMPLETED)
|
||||
assert.equal(completionPresentation(phase).label, '装柜已完成')
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user