vitoordaz commented on code in PR #619:
URL:
https://github.com/apache/arrow-rs-object-store/pull/619#discussion_r2755857616
##########
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:
hyper panics in test environment which usually have `debug_assertions =
true`. In prod `debug_assertions = false` and hyper returns regular response.
I'm wondering if we can update CI to run all tests with `debug_assertions =
false` as well?
--
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]