@@ -421,33 +421,37 @@ export function testBackend(options: TestBackendOptions): void {
421421 await teardown ( backend ) ;
422422 } ) ;
423423
424- test ( "collapses concurrent creates with same key to one run id" , async ( ) => {
425- const backend = await setup ( ) ;
426- const workflowName = randomUUID ( ) ;
427- const version = "v1" ;
428- const idempotencyKey = randomUUID ( ) ;
429-
430- const runs = await Promise . all (
431- Array . from ( { length : 10 } , ( _ , i ) =>
432- backend . createWorkflowRun ( {
433- workflowName,
434- version,
435- idempotencyKey,
436- input : { i } ,
437- config : { } ,
438- context : null ,
439- parentStepAttemptNamespaceId : null ,
440- parentStepAttemptId : null ,
441- availableAt : null ,
442- deadlineAt : null ,
443- } ) ,
444- ) ,
445- ) ;
424+ test (
425+ "collapses concurrent creates with same key to one run id" ,
426+ { timeout : 15_000 } ,
427+ async ( ) => {
428+ const backend = await setup ( ) ;
429+ const workflowName = randomUUID ( ) ;
430+ const version = "v1" ;
431+ const idempotencyKey = randomUUID ( ) ;
432+
433+ const runs = await Promise . all (
434+ Array . from ( { length : 10 } , ( _ , i ) =>
435+ backend . createWorkflowRun ( {
436+ workflowName,
437+ version,
438+ idempotencyKey,
439+ input : { i } ,
440+ config : { } ,
441+ context : null ,
442+ parentStepAttemptNamespaceId : null ,
443+ parentStepAttemptId : null ,
444+ availableAt : null ,
445+ deadlineAt : null ,
446+ } ) ,
447+ ) ,
448+ ) ;
446449
447- const uniqueRunIds = new Set ( runs . map ( ( run ) => run . id ) ) ;
448- expect ( uniqueRunIds . size ) . toBe ( 1 ) ;
449- await teardown ( backend ) ;
450- } ) ;
450+ const uniqueRunIds = new Set ( runs . map ( ( run ) => run . id ) ) ;
451+ expect ( uniqueRunIds . size ) . toBe ( 1 ) ;
452+ await teardown ( backend ) ;
453+ } ,
454+ ) ;
451455
452456 test ( "returns existing completed run for matching key" , async ( ) => {
453457 const backend = await setup ( ) ;
0 commit comments