aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Gernhardt <brian@gernhardtsoftware.com>2010-02-06 09:50:03 -0500
committerJunio C Hamano <gitster@pobox.com>2010-02-06 10:33:07 -0800
commitab35469de0d2d2ba4be58fd0231687ddc9cc3cdc (patch)
tree2ffc9026aaa8e958bb66539f40b17fb1972a10b2
parent6d0d465e20b8c11924bc4e75563324771d0e0d63 (diff)
downloadgit-ab35469de0d2d2ba4be58fd0231687ddc9cc3cdc.tar.gz
git-ab35469de0d2d2ba4be58fd0231687ddc9cc3cdc.tar.xz
t9501: Re-fix max load test
Revert the previous attempt to skip this test on platforms where we currently cannot determine the system load. We want to make sure that the max-load-limit codepath produces results cleanly, when gitweb is updated and becomes capable of reading the load average by some other method. The code to check for load returns 0 if it doesn't know how to find load. It also checks to see if the current load is higher than the max load. So to force the script to quit early by setting the maxload variable negative which should work for systems where we can detect load (which should be a positive number) and systems where we can't (where detected load is 0) Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/t9501-gitweb-standalone-http-status.sh11
1 files changed, 2 insertions, 9 deletions
diff --git a/t/t9501-gitweb-standalone-http-status.sh b/t/t9501-gitweb-standalone-http-status.sh
index 992d72961..d196cc5ca 100755
--- a/t/t9501-gitweb-standalone-http-status.sh
+++ b/t/t9501-gitweb-standalone-http-status.sh
@@ -115,19 +115,12 @@ test_debug 'cat gitweb.output'
# ----------------------------------------------------------------------
# load checking
-if test -e /proc/loadavg
-then
- test_set_prereq PROC_LOADAVG
-else
- say 'skipping load tests (no /proc/loadavg found)'
-fi
-
# always hit the load limit
cat >>gitweb_config.perl <<\EOF
-our $maxload = 0;
+our $maxload = -1;
EOF
-test_expect_success PROC_LOADAVG 'load checking: load too high (default action)' '
+test_expect_success 'load checking: load too high (default action)' '
gitweb_run "p=.git" &&
grep "Status: 503 Service Unavailable" gitweb.headers &&
grep "503 - The load average on the server is too high" gitweb.body