summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2020-04-09 12:01:27 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2020-04-28 20:58:59 +0200
commitf077f4bbeb9605010b612d1f7280e5dde729e6c4 (patch)
tree31bd16f7f37cdc570d3f7f4c7eef348dee174622
parentf0d66e94010902d344c3f5811cb44712a5ffeb00 (diff)
downloadurpmi-f077f4bbeb9605010b612d1f7280e5dde729e6c4.tar
urpmi-f077f4bbeb9605010b612d1f7280e5dde729e6c4.tar.gz
urpmi-f077f4bbeb9605010b612d1f7280e5dde729e6c4.tar.bz2
urpmi-f077f4bbeb9605010b612d1f7280e5dde729e6c4.tar.xz
urpmi-f077f4bbeb9605010b612d1f7280e5dde729e6c4.zip
check that web server has actually started
reports its error messages if any
-rw-r--r--NEWS3
-rwxr-xr-xt/simple-httpd8
-rw-r--r--t/superuser--http.t2
3 files changed, 13 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index bc7ebee4..605b3b49 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- cpan_testers:
+ o check that web server has actually started
+
Version 8.121 - 8 April 2020
- urpmi:
diff --git a/t/simple-httpd b/t/simple-httpd
index 934b98f1..123950ae 100755
--- a/t/simple-httpd
+++ b/t/simple-httpd
@@ -166,6 +166,14 @@ sub content_type {
return "Content-type: $type\r\n";
}
+sub fatal_hook {
+ my ($self, $msg, $pkg, $file, $number, ) = @_;
+ # error message, the package, file, and line number.
+ print $self->status($number, $msg), "\r\n";
+ warn "Error - msg='$msg', pkg='$pkg', file='$file', nb='$number'\n";
+ return;
+}
+
sub error{
my ($self, $number, $msg) = @_;
print $self->status($number, $msg), "\r\n";
diff --git a/t/superuser--http.t b/t/superuser--http.t
index 625c1076..ba74e54c 100644
--- a/t/superuser--http.t
+++ b/t/superuser--http.t
@@ -12,6 +12,8 @@ need_root_and_prepare();
need_downloader();
my $url = start_httpd();
+sleep(1); # give time to server to start
+is(`cat tmp/error.log`, '', 'server error logs are empty');
my $name = 'various';