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 <larsxschneider@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Lars Schneider committed
Dec 18, 2016 at 13:37 UTC
7eeda8b8214bfd171f9ed1265ecc5bfa1d06c607
1 file changed
+1
-16
t/t0021-conversion.sh
+1
-16
@@ -376,22 +376,7 @@ test_expect_success PERL 'required process filter should filter data' '
376
EOF
377
test_cmp_count expected.log rot13-filter.log &&
378
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" &&
380
rm -f test2.r "testsubdir/test3 '\''sq'\'',\$x=.r" &&
381
382
filter_git checkout --quiet --no-progress . &&