@@ -10,7 +10,12 @@ public void GetDelay_WhenAttemptOne_UsesDefaultDelayDelegate()
1010 {
1111 var config = new RetryConfig
1212 {
13- DefaultDelay = ( _ex , _attempt ) => TimeSpan . FromMilliseconds ( 100 ) ,
13+ DefaultDelay = ( ex , attempt ) =>
14+ {
15+ _ = ex ;
16+ _ = attempt ;
17+ return TimeSpan . FromMilliseconds ( 100 ) ;
18+ } ,
1419 MaxDelay = TimeSpan . FromMilliseconds ( 500 )
1520 } ;
1621
@@ -31,6 +36,7 @@ public void GetDelay_WhenAttemptOne_ReturnsBaseDelay_NoJitter()
3136 MaxDelay = TimeSpan . FromMilliseconds ( 500 ) ,
3237 DefaultDelay = ( ex , attempt ) =>
3338 {
39+ _ = ex ;
3440 attempt = Math . Max ( 1 , attempt ) ;
3541 var baseMs = 100.0 * Math . Pow ( 2.0 , attempt - 1 ) ;
3642 var ms = Math . Min ( baseMs , 500.0 ) ;
@@ -48,7 +54,11 @@ public void GetDelay_WhenAttemptOne_ReturnsBaseDelay_NoJitter()
4854 public void GetDelay_WhenStatusHasOverride_ReturnsPerStatusDelay ( )
4955 {
5056 var config = new RetryConfig ( ) ;
51- config . PerStatusDelay [ StatusCode . Unavailable ] = _attempt => TimeSpan . FromMilliseconds ( 123 ) ;
57+ config . PerStatusDelay [ StatusCode . Unavailable ] = attempt =>
58+ {
59+ _ = attempt ;
60+ return TimeSpan . FromMilliseconds ( 123 ) ;
61+ } ;
5262 var policy = new DefaultRetryPolicy ( config ) ;
5363
5464 var ex = new YdbException ( StatusCode . Unavailable , "unavailable" ) ;
0 commit comments