Skip to content

test: add --partial-dir mid-transfer interrupt interop tests - #5395

Merged
oferchen merged 3 commits into
masterfrom
test/partial-dir-mid-transfer-kill
Jun 3, 2026
Merged

oferchen merged 3 commits into
masterfrom
test/partial-dir-mid-transfer-kill

Conversation

@oferchen

@oferchen oferchen commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add 5 integration tests to crates/transfer/src/disk_commit/tests.rs verifying --partial-dir behavior when a transfer is interrupted mid-stream (PIR-6.b, fix(checksums): apply checksum_seed to MD4 strong checksum (upstream parity) #3465)
  • Tests exercise abort, channel disconnect (kill simulation), auto-creation of missing partial-dir, intermediate file size verification, and successful transfer leaving no leftover

Test Details

Test Interrupt Method Verifies
partial_dir_abort_mid_stream_moves_to_partial_dir FileMessage::Abort after 2 chunks Partial in dir, not at dest; content matches written chunks
partial_dir_channel_disconnect_moves_to_partial_dir drop(file_tx) Partial in dir on sudden connection loss
partial_dir_auto_created_on_interrupt FileMessage::Shutdown Non-existent partial-dir created on demand
partial_dir_mid_stream_has_intermediate_size FileMessage::Abort after 300/1000 bytes File size is between 0 and target
partial_dir_whole_file_success_no_leftover_in_partial_dir None (success) Successful transfer leaves no file in partial-dir

Test plan

  • CI passes: fmt+clippy, nextest (stable), Windows, macOS, Linux musl
  • All 5 new tests pass across platforms

@github-actions github-actions Bot added the test label Jun 3, 2026
oferchen added 3 commits June 3, 2026 19:07
Verify that interrupted transfers with --partial-dir correctly move
partial files to the partial directory, not the final destination.

Tests cover: abort mid-stream, channel disconnect (kill simulation),
auto-creation of missing partial-dir, intermediate file size
verification, and successful transfer leaving no leftover in the
partial-dir.
@oferchen
oferchen force-pushed the test/partial-dir-mid-transfer-kill branch from 963c74f to 610854b Compare June 3, 2026 16:07
@oferchen
oferchen merged commit 2db1d89 into master Jun 3, 2026
69 of 70 checks passed
@oferchen
oferchen deleted the test/partial-dir-mid-transfer-kill branch June 3, 2026 19:10
oferchen added a commit that referenced this pull request Aug 24, 2026
* test: add --partial-dir mid-transfer interrupt interop tests (#3465)

Verify that interrupted transfers with --partial-dir correctly move
partial files to the partial directory, not the final destination.

Tests cover: abort mid-stream, channel disconnect (kill simulation),
auto-creation of missing partial-dir, intermediate file size
verification, and successful transfer leaving no leftover in the
partial-dir.

* style: apply cargo fmt formatting

* fix: inline format args in partial-dir test assertions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant