Skip to content

Commit 7eeda8b

Browse files
larsxschneidergitster
authored andcommitted
t0021: fix flaky test
t0021.15 creates files, adds them to the index, and commits them. All this usually happens in a test run within the same second and Git cannot know if the files have been changed between `add` and `commit`. Thus, Git has to run the clean filter in both operations. Sometimes these invocations spread over two different seconds and Git can infer that the files were not changed between `add` and `commit` based on their modification timestamp. The test would fail as it expects the filter invocation. Remove this expectation to make the test stable. Signed-off-by: Lars Schneider <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c6b0831 commit 7eeda8b

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

t/t0021-conversion.sh

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -376,22 +376,7 @@ test_expect_success PERL 'required process filter should filter data' '
376376
EOF
377377
test_cmp_count expected.log rot13-filter.log &&
378378
379-
filter_git commit . -m "test commit 2" &&
380-
cat >expected.log <<-EOF &&
381-
START
382-
init handshake complete
383-
IN: clean test.r $S [OK] -- OUT: $S . [OK]
384-
IN: clean test2.r $S2 [OK] -- OUT: $S2 . [OK]
385-
IN: clean test4-empty.r 0 [OK] -- OUT: 0 [OK]
386-
IN: clean testsubdir/test3 '\''sq'\'',\$x=.r $S3 [OK] -- OUT: $S3 . [OK]
387-
IN: clean test.r $S [OK] -- OUT: $S . [OK]
388-
IN: clean test2.r $S2 [OK] -- OUT: $S2 . [OK]
389-
IN: clean test4-empty.r 0 [OK] -- OUT: 0 [OK]
390-
IN: clean testsubdir/test3 '\''sq'\'',\$x=.r $S3 [OK] -- OUT: $S3 . [OK]
391-
STOP
392-
EOF
393-
test_cmp_count expected.log rot13-filter.log &&
394-
379+
git commit -m "test commit 2" &&
395380
rm -f test2.r "testsubdir/test3 '\''sq'\'',\$x=.r" &&
396381
397382
filter_git checkout --quiet --no-progress . &&

0 commit comments

Comments
 (0)