@@ -366,7 +366,7 @@ describe("WaitForCondition Handler", () => {
366366 const config : WaitForConditionConfig < string > = {
367367 waitStrategy : ( state , attempt ) => {
368368 expect ( state ) . toBe ( "ready" ) ;
369- expect ( attempt ) . toBe ( 2 ) ; // Should use attempt from system
369+ expect ( attempt ) . toBe ( 3 ) ; // Should increment attempt count
370370 return { shouldContinue : false } ;
371371 } ,
372372 initialState : "initial" ,
@@ -395,7 +395,7 @@ describe("WaitForCondition Handler", () => {
395395 const config : WaitForConditionConfig < string > = {
396396 waitStrategy : ( state , attempt ) => {
397397 expect ( state ) . toBe ( "ready" ) ;
398- expect ( attempt ) . toBe ( 2 ) ; // Should use attempt from system
398+ expect ( attempt ) . toBe ( 3 ) ; // Should increment attempt count
399399 return { shouldContinue : false } ;
400400 } ,
401401 initialState : "initial" ,
@@ -424,7 +424,7 @@ describe("WaitForCondition Handler", () => {
424424 const config : WaitForConditionConfig < string > = {
425425 waitStrategy : ( state , attempt ) => {
426426 expect ( state ) . toBe ( "ready" ) ;
427- expect ( attempt ) . toBe ( 2 ) ; // Should still use system attempt number
427+ expect ( attempt ) . toBe ( 3 ) ; // increment on next wait retry
428428 return { shouldContinue : false } ;
429429 } ,
430430 initialState : "initial" ,
@@ -453,7 +453,7 @@ describe("WaitForCondition Handler", () => {
453453 const config : WaitForConditionConfig < string > = {
454454 waitStrategy : ( state , attempt ) => {
455455 expect ( state ) . toBe ( "ready" ) ;
456- expect ( attempt ) . toBe ( 3 ) ; // Should use system attempt number
456+ expect ( attempt ) . toBe ( 4 ) ; // increment on next wait retry
457457 return { shouldContinue : false } ;
458458 } ,
459459 initialState : "initial" ,
@@ -652,7 +652,7 @@ describe("WaitForCondition Handler", () => {
652652 "step-1" ,
653653 "parent-123" , // parentId from handler setup
654654 expect . any ( Function ) , // The wrapped check function
655- 2 , // currentAttempt (1) + 1 = 2
655+ 1 , // currentAttempt = 1 (initial attempt only)
656656 DurableExecutionMode . ExecutionMode ,
657657 ) ;
658658 } ) ;
@@ -707,7 +707,7 @@ describe("WaitForCondition Handler", () => {
707707 "step-1" ,
708708 "parent-123" , // parentId should be passed through
709709 expect . any ( Function ) ,
710- 2 , // currentAttempt (1) + 1 = 2
710+ 1 , // currentAttempt = 1 (initial attempt only)
711711 DurableExecutionMode . ExecutionMode ,
712712 ) ;
713713 } ) ;
0 commit comments