summaryrefslogtreecommitdiff
path: root/t/t5539-fetch-http-shallow.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2014-07-14 01:40:22 -0400
committerJunio C Hamano <gitster@pobox.com>2014-07-15 11:27:08 -0700
commitf0e802ca200b1296495d2ee5c55cd8f8083486bc (patch)
tree18ff9351dddf6223dff5913312827608ed5da04b /t/t5539-fetch-http-shallow.sh
parent73f43f220f0276012de50c84413fd61bf6aa307b (diff)
downloadgit-f0e802ca200b1296495d2ee5c55cd8f8083486bc.tar.gz
t5539: update a flaky testjk/stable-prio-queue
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.
Diffstat (limited to 't/t5539-fetch-http-shallow.sh')
-rwxr-xr-xt/t5539-fetch-http-shallow.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/t/t5539-fetch-http-shallow.sh b/t/t5539-fetch-http-shallow.sh
index 94553e1039..b46118846c 100755
--- a/t/t5539-fetch-http-shallow.sh
+++ b/t/t5539-fetch-http-shallow.sh
@@ -54,6 +54,7 @@ EOF
test_expect_success 'no shallow lines after receiving ACK ready' '
(
cd shallow &&
+ test_tick &&
for i in $(test_seq 15)
do
git checkout --orphan unrelated$i &&