From 329fc60b142699099760c8d28a3048f4629c53b6 Mon Sep 17 00:00:00 2001 From: TapTap Date: Sun, 6 Sep 2026 19:53:22 +0200 Subject: [PATCH] test: make remove-source incremental-skip test deterministic The seed run did not preserve timestamps, so the destination copy's mtime was the write time; the incremental --remove-source-files rerun only skipped the file when both writes happened to land in the same whole second, making the test flaky (observed intermittently in local full-suite runs and on CI). Seed with -M so the destination stores the source's exact mtime. --- tests/integration/test_features.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/integration/test_features.py b/tests/integration/test_features.py index a2993c3..5f55f9d 100644 --- a/tests/integration/test_features.py +++ b/tests/integration/test_features.py @@ -147,7 +147,10 @@ class TestRemoveSourceFiles: with open(source_file, "wb") as f: f.write(b"keep after skip") - result, _ = run_client(source, dest, port=shared_server.port) + # The seed run preserves timestamps (-M) so the destination copy has the + # source's exact mtime; otherwise the incremental skip would depend on + # both writes landing in the same whole second (a race). + result, _ = run_client(source, dest, flags=["-M"], port=shared_server.port) assert result.returncode == 0 result, _ = run_client(source, dest, flags=["--remove-source-files", "--incremental"],