File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
test/Drivers/Databricks/Unit Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ protected override async Task<HttpResponseMessage> SendAsync(
136136 request . Content = null ;
137137
138138 // Check if we would exceed the timeout after waiting, based on error type
139- bool isTooManyRequests = response . StatusCode == HttpStatusCode . TooManyRequests ;
139+ bool isTooManyRequests = response . StatusCode == ( HttpStatusCode ) 429 ;
140140 if ( isTooManyRequests )
141141 {
142142 // Check 429 rate limit timeout
@@ -181,7 +181,7 @@ protected override async Task<HttpResponseMessage> SendAsync(
181181 private bool IsRetryableStatusCode ( HttpStatusCode statusCode )
182182 {
183183 // Check too many requests separately
184- if ( statusCode == HttpStatusCode . TooManyRequests ) // 429
184+ if ( statusCode == ( HttpStatusCode ) 429 ) // 429 Too Many Requests
185185 return _rateLimitRetryEnabled ;
186186
187187 // Check other retryable codes
Original file line number Diff line number Diff line change @@ -321,7 +321,7 @@ public async Task RetryHandlerHandlesRateLimitWithSeparateTimeout()
321321 {
322322 // Create a mock handler that returns a TooManyRequests (429) response with a Retry-After header
323323 var mockHandler = new MockHttpMessageHandler (
324- new HttpResponseMessage ( HttpStatusCode . TooManyRequests )
324+ new HttpResponseMessage ( ( HttpStatusCode ) 429 )
325325 {
326326 Headers = { { "Retry-After" , "1" } } ,
327327 Content = new StringContent ( "Too Many Requests" )
@@ -356,7 +356,7 @@ public async Task RetryHandlerRespectsRateLimitTimeout()
356356 {
357357 // Create a mock handler that always returns a TooManyRequests (429) response with a Retry-After header
358358 var mockHandler = new MockHttpMessageHandler (
359- new HttpResponseMessage ( HttpStatusCode . TooManyRequests )
359+ new HttpResponseMessage ( ( HttpStatusCode ) 429 )
360360 {
361361 Headers = { { "Retry-After" , "2" } } ,
362362 Content = new StringContent ( "Too Many Requests" )
You can’t perform that action at this time.
0 commit comments