@@ -115,7 +115,7 @@ describe("RunLocker", () => {
115115 logger,
116116 tracer : trace . getTracer ( "RunLockTest" ) ,
117117 retryConfig : {
118- maxRetries : 3 ,
118+ maxAttempts : 3 ,
119119 baseDelay : 100 ,
120120 maxTotalWaitTime : 2000 , // 2 second timeout for faster test
121121 } ,
@@ -246,7 +246,7 @@ describe("RunLocker", () => {
246246 logger,
247247 tracer : trace . getTracer ( "RunLockTest" ) ,
248248 retryConfig : {
249- maxRetries : 2 ,
249+ maxAttempts : 2 ,
250250 baseDelay : 50 ,
251251 maxDelay : 200 ,
252252 backoffMultiplier : 2.0 ,
@@ -258,7 +258,7 @@ describe("RunLocker", () => {
258258 try {
259259 // Verify configuration is set correctly
260260 const config = runLock . getRetryConfig ( ) ;
261- expect ( config . maxRetries ) . toBe ( 2 ) ;
261+ expect ( config . maxAttempts ) . toBe ( 2 ) ;
262262 expect ( config . baseDelay ) . toBe ( 50 ) ;
263263 expect ( config . maxDelay ) . toBe ( 200 ) ;
264264 expect ( config . backoffMultiplier ) . toBe ( 2.0 ) ;
@@ -288,7 +288,7 @@ describe("RunLocker", () => {
288288 logger,
289289 tracer : trace . getTracer ( "RunLockTest" ) ,
290290 retryConfig : {
291- maxRetries : 2 ,
291+ maxAttempts : 2 ,
292292 baseDelay : 50 ,
293293 maxTotalWaitTime : 500 , // Shorter timeout to ensure failure
294294 } ,
@@ -315,7 +315,7 @@ describe("RunLocker", () => {
315315 if ( error instanceof LockAcquisitionTimeoutError ) {
316316 expect ( error . resources ) . toEqual ( [ "test-error" ] ) ;
317317 expect ( error . attempts ) . toBeGreaterThan ( 0 ) ;
318- expect ( error . attempts ) . toBeLessThanOrEqual ( 3 ) ; // maxRetries + 1
318+ expect ( error . attempts ) . toBeLessThanOrEqual ( 3 ) ; // maxAttempts + 1
319319 expect ( error . totalWaitTime ) . toBeGreaterThan ( 0 ) ;
320320 expect ( error . totalWaitTime ) . toBeLessThanOrEqual ( 800 ) ; // Some tolerance
321321 expect ( error . name ) . toBe ( "LockAcquisitionTimeoutError" ) ;
@@ -344,7 +344,7 @@ describe("RunLocker", () => {
344344
345345 try {
346346 const config = runLock . getRetryConfig ( ) ;
347- expect ( config . maxRetries ) . toBe ( 10 ) ;
347+ expect ( config . maxAttempts ) . toBe ( 10 ) ;
348348 expect ( config . baseDelay ) . toBe ( 200 ) ;
349349 expect ( config . maxDelay ) . toBe ( 5000 ) ;
350350 expect ( config . backoffMultiplier ) . toBe ( 1.5 ) ;
@@ -371,15 +371,15 @@ describe("RunLocker", () => {
371371 logger,
372372 tracer : trace . getTracer ( "RunLockTest" ) ,
373373 retryConfig : {
374- maxRetries : 5 ,
374+ maxAttempts : 5 ,
375375 maxTotalWaitTime : 10000 ,
376376 // Other values should use defaults
377377 } ,
378378 } ) ;
379379
380380 try {
381381 const config = runLock . getRetryConfig ( ) ;
382- expect ( config . maxRetries ) . toBe ( 5 ) ; // Overridden
382+ expect ( config . maxAttempts ) . toBe ( 5 ) ; // Overridden
383383 expect ( config . maxTotalWaitTime ) . toBe ( 10000 ) ; // Overridden
384384 expect ( config . baseDelay ) . toBe ( 200 ) ; // Default
385385 expect ( config . maxDelay ) . toBe ( 5000 ) ; // Default
@@ -643,7 +643,7 @@ describe("RunLocker", () => {
643643 duration : 3000 ,
644644 automaticExtensionThreshold : 300 ,
645645 retryConfig : {
646- maxRetries : 5 ,
646+ maxAttempts : 5 ,
647647 baseDelay : 150 ,
648648 } ,
649649 } ) ;
@@ -654,7 +654,7 @@ describe("RunLocker", () => {
654654 expect ( runLock . getAutomaticExtensionThreshold ( ) ) . toBe ( 300 ) ;
655655
656656 const retryConfig = runLock . getRetryConfig ( ) ;
657- expect ( retryConfig . maxRetries ) . toBe ( 5 ) ;
657+ expect ( retryConfig . maxAttempts ) . toBe ( 5 ) ;
658658 expect ( retryConfig . baseDelay ) . toBe ( 150 ) ;
659659
660660 // Test basic functionality with all custom configs
@@ -681,7 +681,7 @@ describe("RunLocker", () => {
681681 duration : 10000 ,
682682 automaticExtensionThreshold : 2000 ,
683683 retryConfig : {
684- maxRetries : 15 ,
684+ maxAttempts : 15 ,
685685 baseDelay : 100 ,
686686 maxDelay : 3000 ,
687687 backoffMultiplier : 1.8 ,
@@ -696,7 +696,7 @@ describe("RunLocker", () => {
696696 expect ( runLock . getAutomaticExtensionThreshold ( ) ) . toBe ( 2000 ) ;
697697
698698 const retryConfig = runLock . getRetryConfig ( ) ;
699- expect ( retryConfig . maxRetries ) . toBe ( 15 ) ;
699+ expect ( retryConfig . maxAttempts ) . toBe ( 15 ) ;
700700 expect ( retryConfig . baseDelay ) . toBe ( 100 ) ;
701701 expect ( retryConfig . maxDelay ) . toBe ( 3000 ) ;
702702 expect ( retryConfig . backoffMultiplier ) . toBe ( 1.8 ) ;
@@ -722,22 +722,22 @@ describe("RunLocker", () => {
722722 redisTest ( "Test configuration edge cases" , { timeout : 15_000 } , async ( { redisOptions } ) => {
723723 const logger = new Logger ( "RunLockTest" , "debug" ) ;
724724
725- // Test with maxRetries = 0
725+ // Test with maxAttempts = 0
726726 const redis1 = createRedisClient ( redisOptions ) ;
727727 const runLock1 = new RunLocker ( {
728728 redis : redis1 ,
729729 logger,
730730 tracer : trace . getTracer ( "RunLockTest" ) ,
731731 retryConfig : {
732- maxRetries : 0 ,
732+ maxAttempts : 0 ,
733733 baseDelay : 100 ,
734734 maxTotalWaitTime : 1000 ,
735735 } ,
736736 } ) ;
737737
738738 try {
739739 const config = runLock1 . getRetryConfig ( ) ;
740- expect ( config . maxRetries ) . toBe ( 0 ) ;
740+ expect ( config . maxAttempts ) . toBe ( 0 ) ;
741741
742742 // Should work for successful acquisitions
743743 await runLock1 . lock ( "test-lock" , [ "test-edge" ] , async ( ) => {
@@ -754,7 +754,7 @@ describe("RunLocker", () => {
754754 logger,
755755 tracer : trace . getTracer ( "RunLockTest" ) ,
756756 retryConfig : {
757- maxRetries : 2 ,
757+ maxAttempts : 2 ,
758758 baseDelay : 1 ,
759759 maxDelay : 10 ,
760760 backoffMultiplier : 2.0 ,
@@ -785,7 +785,7 @@ describe("RunLocker", () => {
785785 logger,
786786 tracer : trace . getTracer ( "RunLockTest" ) ,
787787 retryConfig : {
788- maxRetries : 100 , // High retry count
788+ maxAttempts : 100 , // High retry count
789789 baseDelay : 100 ,
790790 maxTotalWaitTime : 500 , // But low total wait time
791791 } ,
@@ -794,7 +794,7 @@ describe("RunLocker", () => {
794794 try {
795795 // Test that total wait time configuration is properly applied
796796 const config = runLock . getRetryConfig ( ) ;
797- expect ( config . maxRetries ) . toBe ( 100 ) ;
797+ expect ( config . maxAttempts ) . toBe ( 100 ) ;
798798 expect ( config . maxTotalWaitTime ) . toBe ( 500 ) ;
799799 expect ( config . baseDelay ) . toBe ( 100 ) ;
800800
@@ -946,7 +946,7 @@ describe("RunLocker", () => {
946946 tracer : trace . getTracer ( "RunLockTest" ) ,
947947 duration : 30000 ,
948948 retryConfig : {
949- maxRetries : 3 ,
949+ maxAttempts : 3 ,
950950 baseDelay : 100 ,
951951 maxDelay : 500 ,
952952 backoffMultiplier : 2.0 ,
0 commit comments