From 6154e231ee37867e836988eeb01b2b4db99e5f10 Mon Sep 17 00:00:00 2001 From: "vercel[bot]" <35613825+vercel[bot]@users.noreply.github.com> Date: Sat, 22 Aug 2026 01:18:05 +0000 Subject: [PATCH] [e2e] Probe: raise 1s workflow sleeps to 6s Co-Authored-By: shalabhc --- packages/core/e2e/e2e.test.ts | 10 ++++----- workbench/example/workflows/99_e2e.ts | 32 +++++++++++++-------------- workbench/python/workflows/99_e2e.py | 2 +- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/packages/core/e2e/e2e.test.ts b/packages/core/e2e/e2e.test.ts index d8868d2c47..6cf5af2b26 100644 --- a/packages/core/e2e/e2e.test.ts +++ b/packages/core/e2e/e2e.test.ts @@ -1110,7 +1110,7 @@ describe.concurrent('e2e', () => { ] as const; for (const tc of startIndexCases) { - test(tc.name, { timeout: 60_000 }, async () => { + test(tc.name, { timeout: 120_000 }, async () => { const run = await start(await e2e('outputStreamWorkflow'), []); if (tc.waitForCompletion) { @@ -1162,7 +1162,7 @@ describe.concurrent('e2e', () => { test( 'getTailIndex returns correct index after stream completes', { - timeout: 60_000, + timeout: 120_000, }, async () => { const run = await start(await e2e('outputStreamWorkflow'), []); @@ -1179,7 +1179,7 @@ describe.concurrent('e2e', () => { test( 'getTailIndex returns -1 before any chunks are written', { - timeout: 60_000, + timeout: 120_000, }, async () => { const run = await start(await e2e('outputStreamWorkflow'), []); @@ -1196,7 +1196,7 @@ describe.concurrent('e2e', () => { test( 'getChunks returns same content as reading the stream', { - timeout: 60_000, + timeout: 120_000, }, async () => { const run = await start(await e2e('outputStreamWorkflow'), []); @@ -1238,7 +1238,7 @@ describe.concurrent('e2e', () => { test( 'outputStreamInsideStepWorkflow - getWritable() called inside step functions', - { timeout: 60_000 }, + { timeout: 120_000 }, async () => { const run = await start(await e2e('outputStreamInsideStepWorkflow'), []); const reader = run.getReadable().getReader(); diff --git a/workbench/example/workflows/99_e2e.ts b/workbench/example/workflows/99_e2e.ts index 587c200215..b07b447674 100644 --- a/workbench/example/workflows/99_e2e.ts +++ b/workbench/example/workflows/99_e2e.ts @@ -209,7 +209,7 @@ export async function sleepingWorkflow(durationMs = 10_000) { export async function parallelSleepWorkflow() { 'use workflow'; const startTime = Date.now(); - await Promise.all(Array.from({ length: 10 }, () => sleep('1s'))); + await Promise.all(Array.from({ length: 10 }, () => sleep('6s'))); const endTime = Date.now(); return { startTime, endTime }; } @@ -227,7 +227,7 @@ export async function sleepWinsRaceWorkflow() { const startTime = Date.now(); const winner = await Promise.race([ delayMsStep(10_000, 'step'), - sleep('1s').then(() => 'sleep'), + sleep('6s').then(() => 'sleep'), ]); const endTime = Date.now(); return { winner, durationMs: endTime - startTime }; @@ -277,7 +277,7 @@ export async function retainedInterleavingWorkflow(token: string) { sleep('30s').then(() => 'sleep'), ]); // 'step' // Wait boundary: plain sleep. - await sleep('1s'); + await sleep('6s'); // Hook boundary: hook payload awaited in parallel with a primitive step. using hook = createHook<{ delta: number }>({ token }); const [payload, g] = await Promise.all([hook, add(e + f, 100)]); // _, 137 @@ -356,15 +356,15 @@ export async function outputStreamWorkflow() { 'use workflow'; const writable = getWritable(); const namedWritable = getWritable({ namespace: 'test' }); - await sleep('1s'); + await sleep('6s'); await stepWithOutputStreamBinary(writable, 'Hello, world!'); - await sleep('1s'); + await sleep('6s'); await stepWithOutputStreamBinary(namedWritable, 'Hello, named stream!'); - await sleep('1s'); + await sleep('6s'); await stepWithOutputStreamObject(writable, { foo: 'test' }); - await sleep('1s'); + await sleep('6s'); await stepWithOutputStreamObject(namedWritable, { foo: 'bar' }); - await sleep('1s'); + await sleep('6s'); await stepCloseOutputStream(writable); await stepCloseOutputStream(namedWritable); return 'done'; @@ -402,17 +402,17 @@ async function stepCloseOutputStreamInsideStep(namespace?: string) { export async function outputStreamInsideStepWorkflow() { 'use workflow'; - await sleep('1s'); + await sleep('6s'); await stepWithOutputStreamInsideStep('Hello from step!'); - await sleep('1s'); + await sleep('6s'); await stepWithNamedOutputStreamInsideStep('step-ns', { message: 'Hello from named stream in step!', }); - await sleep('1s'); + await sleep('6s'); await stepWithOutputStreamInsideStep('Second message'); - await sleep('1s'); + await sleep('6s'); await stepWithNamedOutputStreamInsideStep('step-ns', { counter: 42 }); - await sleep('1s'); + await sleep('6s'); await stepCloseOutputStreamInsideStep(); await stepCloseOutputStreamInsideStep('step-ns'); return 'done'; @@ -441,7 +441,7 @@ async function stepWriteUtf8Json(writable: WritableStream, value: unknown) { export async function utf8StreamWorkflow() { 'use workflow'; const writable = getWritable(); - await sleep('1s'); + await sleep('6s'); await stepWriteUtf8Text(writable, 'Hello, world!'); await stepWriteUtf8Text(writable, 'Café — naïve résumé'); await stepWriteUtf8Text(writable, '你好,世界!🌍✨'); @@ -2549,7 +2549,7 @@ export async function abortSurvivesReplayWorkflow() { const before = await checkSignalState(controller.signal); // Sleep causes workflow to suspend and replay - await sleep('1s'); + await sleep('6s'); // Abort after replay controller.abort('after-replay'); @@ -2922,7 +2922,7 @@ export async function abortDeterministicBranchFromStepWorkflow() { // which only runs at the next checkpoint that drains the promise queue — // not synchronously after the step's await resolves. This mirrors how // step return values become visible: only at a suspension boundary. - await sleep('1s'); + await sleep('6s'); // Post-abort read. MUST be true on first-run AND replay — the events // consumer has now drained `_setAborted` for the hook_received event. diff --git a/workbench/python/workflows/99_e2e.py b/workbench/python/workflows/99_e2e.py index 3cd1e0d51c..5ef05a4bf4 100644 --- a/workbench/python/workflows/99_e2e.py +++ b/workbench/python/workflows/99_e2e.py @@ -125,7 +125,7 @@ async def sleepingWorkflow(durationMs: int = 10_000) -> dict: @app.workflow async def parallelSleepWorkflow() -> dict: startTime = time_ns() // 1_000_000 - await asyncio.gather(*(sleep("1s") for _ in range(10))) + await asyncio.gather(*(sleep("6s") for _ in range(10))) endTime = time_ns() // 1_000_000 return {"startTime": startTime, "endTime": endTime}