[libhijk-perl] 04/06: t/live-plack.t: do the kill inside END

Robin Sheat eythian-guest at moszumanska.debian.org
Thu Feb 12 21:55:28 UTC 2015


This is an automated email from the git hooks/post-receive script.

eythian-guest pushed a commit to annotated tag 0.18
in repository libhijk-perl.

commit 1fb0b3a9d045841418c189cd06ea2dab43115334
Author: Ævar Arnfjörð Bjarmason <avarab at gmail.com>
Date:   Wed Dec 10 13:20:03 2014 +0000

    t/live-plack.t: do the kill inside END
    
    If this dies we won't kill the process, but now we'll try harder.
---
 Changes        | 2 ++
 t/live-plack.t | 3 +--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Changes b/Changes
index 17d170d..001bc46 100644
--- a/Changes
+++ b/Changes
@@ -2,6 +2,8 @@
 - We now do the right thing on "method => 'HEAD'". I.e. ignore the
   Content-Length parameter, previously we'd just hang trying to slurp
   up the body.
+- Fix an edge case with some of the live tests leaving around a HTTP
+  server if they died, these don't run by default.
 
 0.17: # 2014-08-31T18:30:00+000
 - Minor documentation changes, no functional changes.
diff --git a/t/live-plack.t b/t/live-plack.t
index 8146b35..c717e7d 100644
--- a/t/live-plack.t
+++ b/t/live-plack.t
@@ -19,7 +19,6 @@ die "Fail to fork then start a plack server" unless defined $pid;
 if ($pid == 0) {
     require Plack::Runner;
     my $runner = Plack::Runner->new;
-    print STDERR "$FindBin::Bin/bin/it-takes-time.psgi\n";
     $runner->parse_options("--port", "5001", "$FindBin::Bin/bin/it-takes-time.psgi");
     $runner->run;
     exit;
@@ -48,6 +47,6 @@ subtest "do not expect timeout" => sub {
     } 'local plack send back something within 10s';
 };
 
-kill INT => $pid;
+END { kill INT => $pid }
 
 done_testing;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libhijk-perl.git



More information about the Pkg-perl-cvs-commits mailing list