Skip to content

Commit f0e802c

Browse files
peffgitster
authored andcommitted
t5539: update a flaky test
The test creates some unrelated commits in two separate repositories, and then fetches from one to the other. Since the commit creation happens in a subshell, the first commit in each ends up with the same test_tick value. When fetch-pack looks at the two root commits "unrelated1" and "new-too", the exact sequence of ACKs is different depending on which one it pulls out of the queue first. With the current code, it happens to be "unrelated1" (though this is not at all guaranteed by the prio_queue data structure, it is deterministic for this particular sequence of input). We see the ready-ACK, and the test succeeds. With the stable queue, we reliably get "new-too" out (since it is our local tip, it is added to the queue before we even talk to the remote). We never see a ready-ACK, and the test fails due to the grep on the TRACE_PACKET output at the end (the fetch itself succeeds as expected). I'm really not quite clear on what's supposed to be going on in the test. I can make it pass with this change.
1 parent 73f43f2 commit f0e802c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

t/t5539-fetch-http-shallow.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ EOF
5454
test_expect_success 'no shallow lines after receiving ACK ready' '
5555
(
5656
cd shallow &&
57+
test_tick &&
5758
for i in $(test_seq 15)
5859
do
5960
git checkout --orphan unrelated$i &&

0 commit comments

Comments
 (0)