alamb commented on code in PR #422:
URL: 
https://github.com/apache/arrow-rs-object-store/pull/422#discussion_r2179842104


##########
src/client/retry.rs:
##########
@@ -657,11 +664,15 @@ mod tests {
             );
         }
 
-        let e = do_request().await.unwrap_err().to_string();
+        let e = do_request().await.unwrap_err();
         assert!(
-            e.contains(" after 2 retries, max_retries: 2, retry_timeout: 1000s 
 - Server returned non-2xx status code: 502 Bad Gateway"),
+            e.to_string().contains(" after 2 retries, max_retries: 2, 
retry_timeout: 1000s  - Server returned non-2xx status code: 502 Bad Gateway"),
             "{e}"
         );
+        assert_eq!(

Review Comment:
   I think it would help to add a comment here saying the use of `e.source()` 
was intentional
   
   Perhaps something like
   
   ```suggestion
           // verify e.source() is available as well for users who need 
programatic access
           assert_eq!(
   ```
   
   (also in the one below)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to