vitoordaz commented on code in PR #619:
URL: 
https://github.com/apache/arrow-rs-object-store/pull/619#discussion_r2760233988


##########
src/client/get.rs:
##########
@@ -579,6 +579,83 @@ mod http_tests {
         let b = store.get(&path).await.unwrap().bytes().await.unwrap();
         assert_eq!(b.as_ref(), b"Hello World");
 
+        // Test basic with range
+        let resp = Response::builder()
+            .status(StatusCode::PARTIAL_CONTENT)
+            .header(CONTENT_LENGTH, 4)
+            .header(ETAG, "123")
+            .header(CONTENT_RANGE, "bytes 1-4/11")
+            .body("ello".to_string())
+            .unwrap();
+
+        mock.push(resp);
+
+        let b = store.get_range(&path, 1..5).await.unwrap();
+        assert_eq!(b.as_ref(), b"ello");
+
+        // NOTE: if debug_assertions is true, hyper panics with response 
content length header
+        // value does not match the length of response body.

Review Comment:
   yes, I think that this will work. I was using this command to run this test
   
   ```
   RUSTFLAGS="-C debug-assertions=false" RUST_BACKTRACE=full cargo test 
--features http client::get::http_tests::test_stream_retry
   ```



-- 
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