summaryrefslogtreecommitdiff
path: root/t/t5551-http-fetch-smart.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-03-23 11:28:10 -0700
committerJunio C Hamano <gitster@pobox.com>2015-03-23 11:28:10 -0700
commit07da4e092f4ce90271f8545b1b50c1a272dfaefb (patch)
tree4bd62fea9fdc5755306670beaea9e0874bb833c9 /t/t5551-http-fetch-smart.sh
parentc12eca7ed24a4ccf8d1d9c3c2b84595501af4bea (diff)
parent376e4b39d4453ce50cbacc9c46a3bbdaad2134b2 (diff)
downloadgit-07da4e092f4ce90271f8545b1b50c1a272dfaefb.tar.gz
Merge branch 'jk/test-annoyances'
Test fixes. * jk/test-annoyances: t5551: make EXPENSIVE test cheaper t5541: move run_with_cmdline_limit to test-lib.sh t: pass GIT_TRACE through Apache t: redirect stderr GIT_TRACE to descriptor 4 t: translate SIGINT to an exit
Diffstat (limited to 't/t5551-http-fetch-smart.sh')
-rwxr-xr-xt/t5551-http-fetch-smart.sh19
1 files changed, 14 insertions, 5 deletions
diff --git a/t/t5551-http-fetch-smart.sh b/t/t5551-http-fetch-smart.sh
index b97077351d..df47851752 100755
--- a/t/t5551-http-fetch-smart.sh
+++ b/t/t5551-http-fetch-smart.sh
@@ -224,10 +224,10 @@ test_expect_success 'transfer.hiderefs works over smart-http' '
git -C hidden.git rev-parse --verify b
'
-test_expect_success EXPENSIVE 'create 50,000 tags in the repo' '
+test_expect_success 'create 2,000 tags in the repo' '
(
cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
- for i in `test_seq 50000`
+ for i in $(test_seq 2000)
do
echo "commit refs/heads/too-many-refs"
echo "mark :$i"
@@ -248,13 +248,22 @@ test_expect_success EXPENSIVE 'create 50,000 tags in the repo' '
)
'
-test_expect_success EXPENSIVE 'clone the 50,000 tag repo to check OS command line overflow' '
- git clone $HTTPD_URL/smart/repo.git too-many-refs &&
+test_expect_success CMDLINE_LIMIT \
+ 'clone the 2,000 tag repo to check OS command line overflow' '
+ run_with_limited_cmdline git clone $HTTPD_URL/smart/repo.git too-many-refs &&
(
cd too-many-refs &&
- test $(git for-each-ref refs/tags | wc -l) = 50000
+ git for-each-ref refs/tags >actual &&
+ test_line_count = 2000 actual
)
'
+test_expect_success 'large fetch-pack requests can be split across POSTs' '
+ GIT_CURL_VERBOSE=1 git -c http.postbuffer=65536 \
+ clone --bare "$HTTPD_URL/smart/repo.git" split.git 2>err &&
+ grep "^> POST" err >posts &&
+ test_line_count = 2 posts
+'
+
stop_httpd
test_done