Skip to content

Commit a7d6bcc

Browse files
dschogitster
authored andcommitted
t6026: ensure that long-running script really is
When making sure that background tasks are cleaned up in 5babb5b (t6026-merge-attr: clean up background process at end of test case, 2016-09-07), we considered to let the background task sleep longer, just to be certain that it will still be running when we want to kill it after the test. Sadly, the assumption appears not to hold true that the test case passes quickly enough to kill the background task within a second. Simply increase it to an hour. No system can be possibly slow enough to make above-mentioned assumption incorrect. Reported by Andreas Schwab. Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b36b716 commit a7d6bcc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

t/t6026-merge-attr.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,16 +183,16 @@ test_expect_success 'up-to-date merge without common ancestor' '
183183

184184
test_expect_success 'custom merge does not lock index' '
185185
git reset --hard anchor &&
186-
write_script sleep-one-second.sh <<-\EOF &&
187-
sleep 1 &
186+
write_script sleep-an-hour.sh <<-\EOF &&
187+
sleep 3600 &
188188
echo $! >sleep.pid
189189
EOF
190190
test_when_finished "kill \$(cat sleep.pid)" &&
191191
192192
test_write_lines >.gitattributes \
193-
"* merge=ours" "text merge=sleep-one-second" &&
193+
"* merge=ours" "text merge=sleep-an-hour" &&
194194
test_config merge.ours.driver true &&
195-
test_config merge.sleep-one-second.driver ./sleep-one-second.sh &&
195+
test_config merge.sleep-an-hour.driver ./sleep-an-hour.sh &&
196196
git merge master
197197
'
198198

0 commit comments

Comments
 (0)