Skip to content

test(storage): verify appendable object chunking and checksums - #6659

Draft
joshuatants wants to merge 3 commits into
googleapis:grpc_rustfrom
joshuatants:grpc_rust_parity_append_chunking
Draft

test(storage): verify appendable object chunking and checksums#6659
joshuatants wants to merge 3 commits into
googleapis:grpc_rustfrom
joshuatants:grpc_rust_parity_append_chunking

Conversation

@joshuatants

Copy link
Copy Markdown
Contributor

For #5991

@product-auto-label product-auto-label Bot added the api: storage Issues related to the Cloud Storage API. label Sep 4, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/storage/tests/appendable_object_grpc.rs
@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.59%. Comparing base (2bb0478) to head (e2e51f0).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

WriteEvent::Chunk {
write_offset: (2 * MIB) as i64,
size: 2 * MIB,
crc32c: Some(crc32c::crc32c(&payload[0..2 * MIB])),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be the second chunk, therefore 2 * MiB..4 * MiB ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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])),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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])),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it only passes because the payload is 0x42...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the Cloud Storage API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants