Skip to content

Stabilize daemon integration test port allocation - #1344

Merged
oferchen merged 1 commit into
masterfrom
fix-rsync-daemon-test-connection-errors
Oct 28, 2025
Merged

oferchen merged 1 commit into
masterfrom
fix-rsync-daemon-test-connection-errors

Conversation

@oferchen

@oferchen oferchen commented Oct 28, 2025 •

Copy link
Copy Markdown
Owner

Summary

  • add an atomic helper for reserving unique TCP ports during daemon tests
  • update daemon tests to rely on the helper instead of binding and dropping ephemeral listeners

Testing

  • cargo test -p rsync-daemon

@oferchen
oferchen merged commit 5e4389a into master Oct 28, 2025
@oferchen
oferchen deleted the fix-rsync-daemon-test-connection-errors branch October 28, 2025 11:18
oferchen added a commit that referenced this pull request Mar 21, 2026
Replace raw env::set_var / env::remove_var calls in test code with
scoped EnvGuard structs that automatically restore the previous value on
drop. This prevents environment variable leaks between tests when a test
panics before manual cleanup.

Files converted:
- engine partial_transfers.rs: 2 tests (PartialEnvGuard)
- engine partial.rs: 3 tests (EnvGuard)
- cli arguments/env.rs: replaced closure-based with_env_var with EnvGuard

Also includes cargo fmt reformats in batch, core, fast_io, and protocol
test files.

Closes #1344
oferchen added a commit that referenced this pull request Mar 22, 2026
Replace raw env::set_var / env::remove_var calls in test code with
scoped EnvGuard structs that automatically restore the previous value on
drop. This prevents environment variable leaks between tests when a test
panics before manual cleanup.

Files converted:
- engine partial_transfers.rs: 2 tests (PartialEnvGuard)
- engine partial.rs: 3 tests (EnvGuard)
- cli arguments/env.rs: replaced closure-based with_env_var with EnvGuard

Also includes cargo fmt reformats in batch, core, fast_io, and protocol
test files.

Closes #1344
oferchen added a commit that referenced this pull request Mar 22, 2026
Replace raw env::set_var / env::remove_var calls in test code with
scoped EnvGuard structs that automatically restore the previous value on
drop. This prevents environment variable leaks between tests when a test
panics before manual cleanup.

Files converted:
- engine partial_transfers.rs: 2 tests (PartialEnvGuard)
- engine partial.rs: 3 tests (EnvGuard)
- cli arguments/env.rs: replaced closure-based with_env_var with EnvGuard

Also includes cargo fmt reformats in batch, core, fast_io, and protocol
test files.

Closes #1344
oferchen added a commit that referenced this pull request May 1, 2026
Replace raw env::set_var / env::remove_var calls in test code with
scoped EnvGuard structs that automatically restore the previous value on
drop. This prevents environment variable leaks between tests when a test
panics before manual cleanup.

Files converted:
- engine partial_transfers.rs: 2 tests (PartialEnvGuard)
- engine partial.rs: 3 tests (EnvGuard)
- cli arguments/env.rs: replaced closure-based with_env_var with EnvGuard

Also includes cargo fmt reformats in batch, core, fast_io, and protocol
test files.

Closes #1344
oferchen added a commit that referenced this pull request May 5, 2026
Replace raw env::set_var / env::remove_var calls in test code with
scoped EnvGuard structs that automatically restore the previous value on
drop. This prevents environment variable leaks between tests when a test
panics before manual cleanup.

Files converted:
- engine partial_transfers.rs: 2 tests (PartialEnvGuard)
- engine partial.rs: 3 tests (EnvGuard)
- cli arguments/env.rs: replaced closure-based with_env_var with EnvGuard

Also includes cargo fmt reformats in batch, core, fast_io, and protocol
test files.

Closes #1344
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