Skip to content

fix: backdate destination file mtimes in quick-check sensitive tests - #2944

Merged
oferchen merged 1 commit into
masterfrom
fix/backdate-mtime-flaky-tests
Mar 22, 2026
Merged

oferchen merged 1 commit into
masterfrom
fix/backdate-mtime-flaky-tests

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Backdate destination file mtimes by 1 hour in 4 tests where source and destination have identical sizes but no explicit mtime was set, making them susceptible to rsync quick-check flakiness (same size + same mtime = skip transfer)
  • Follows the existing codebase pattern of using filetime::set_file_mtime with a past timestamp to ensure deterministic quick-check behavior

Affected tests

  • execute_dry_run_with_existing_destination_reports_no_creation - both 11 bytes
  • execute_with_delete_respects_dry_run - both 5 bytes
  • dry_run_with_backup_does_not_create_backup_files - both 3 bytes
  • owner_preserved_with_existing_destination - both 11 bytes

Test plan

  • CI passes on all platforms (Linux, macOS, Windows)
  • No regressions in cargo nextest run -p engine --all-features
  • Verify the 4 affected tests pass reliably across repeated runs

Fixes #1333

@oferchen
oferchen merged commit 420e021 into master Mar 22, 2026
5 of 10 checks passed
@oferchen
oferchen deleted the fix/backdate-mtime-flaky-tests branch March 22, 2026 09:38
@github-actions github-actions Bot added the bug Something isn't working label Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant