fix: unblock local news page generation
This commit is contained in:
@@ -2652,6 +2652,7 @@ test('agent run fails non-retryably when tool gateway artifact validation fails'
|
||||
|
||||
test('agent run retries transient failures and then becomes terminal', async () => {
|
||||
const pool = createFakePool();
|
||||
const retryCancellations = [];
|
||||
const gateway = createAgentRunGateway({
|
||||
pool,
|
||||
userAuth: {},
|
||||
@@ -2663,6 +2664,10 @@ test('agent run retries transient failures and then becomes terminal', async ()
|
||||
throw new Error('upstream unavailable');
|
||||
},
|
||||
},
|
||||
cancelSessionOnRetry: async (input) => {
|
||||
retryCancellations.push(input);
|
||||
return { cancelled: true, skipped: false };
|
||||
},
|
||||
retryDelaysMs: [0, 0],
|
||||
});
|
||||
|
||||
@@ -2674,6 +2679,22 @@ test('agent run retries transient failures and then becomes terminal', async ()
|
||||
await waitFor(() => pool.runs.get(run.id)?.status === 'failed');
|
||||
assert.equal(pool.runs.get(run.id).attempts, 2);
|
||||
assert.match(pool.runs.get(run.id).error_message, /upstream unavailable/);
|
||||
assert.deepEqual(retryCancellations, [
|
||||
{
|
||||
runId: run.id,
|
||||
userId: 'user-1',
|
||||
sessionId: 'session-1',
|
||||
requestId: 'req-1',
|
||||
},
|
||||
]);
|
||||
assert.equal(
|
||||
pool.events.some(
|
||||
(event) =>
|
||||
event.runId === run.id
|
||||
&& event.eventType === 'session_request_cancelled_for_retry',
|
||||
),
|
||||
true,
|
||||
);
|
||||
});
|
||||
|
||||
test('agent run queue limits concurrent execution', async () => {
|
||||
|
||||
Reference in New Issue
Block a user