test(storage): verify appendable object chunking and checksums - #6659
test(storage): verify appendable object chunking and checksums#6659joshuatants wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new integration test file appendable_object_grpc.rs to verify that chunking, offsets, and checksums are correctly preserved during appendable object operations against a mock gRPC storage server. The feedback suggests optimizing the test assertions by slicing the existing payload buffer instead of allocating new vectors when computing CRC32C values, which avoids unnecessary heap allocations.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## grpc_rust #6659 +/- ##
==========================================
Coverage 96.59% 96.59%
==========================================
Files 312 312
Lines 96002 96002
==========================================
+ Hits 92729 92731 +2
+ Misses 3273 3271 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| WriteEvent::Chunk { | ||
| write_offset: (2 * MIB) as i64, | ||
| size: 2 * MIB, | ||
| crc32c: Some(crc32c::crc32c(&payload[0..2 * MIB])), |
There was a problem hiding this comment.
Shouldn't this be the second chunk, therefore 2 * MiB..4 * MiB ?
There was a problem hiding this comment.
I think it only passes because the payload is 0x42...
| WriteEvent::Chunk { | ||
| write_offset: (4 * MIB) as i64, | ||
| size: MIB, | ||
| crc32c: Some(crc32c::crc32c(&payload[0..MIB])), |
There was a problem hiding this comment.
Third chunk is 4 to 5 ?
| WriteEvent::Chunk { | ||
| write_offset: (2 * MIB) as i64, | ||
| size: 2 * MIB, | ||
| crc32c: Some(crc32c::crc32c(&payload[0..2 * MIB])), |
There was a problem hiding this comment.
I think it only passes because the payload is 0x42...
For #5991