use IPC::Open3 rather than IPC::Run3
[catagits/Catalyst-Devel.git] / t / optional_http-server-restart.t
index ecfa842..884ff73 100644 (file)
@@ -19,11 +19,7 @@ use IO::Socket;
 use IPC::Open3;
 use Time::HiRes qw/sleep/;
 use Catalyst::Helper;
-eval "use Catalyst::Devel 1.04;";
-
-plan skip_all => 'Catalyst::Devel >= 1.04 required' if $@;
-eval "use File::Copy::Recursive";
-plan skip_all => 'File::Copy::Recursive required' if $@;
+use File::Copy::Recursive;
 
 plan tests => 35;
 
@@ -121,7 +117,7 @@ for ( 1 .. 5 ) {
 # we need different options so we have to rebuild most
 # of the testing environment
 
-kill 'KILL', $pid or die "Cannot kill $pid: $!";
+kill 9, $pid or die "Cannot send kill signal to $pid: $!";
 close $server or die "Cannot close handle to server process: $!";
 wait;
 
@@ -166,7 +162,7 @@ for ( 1 .. 5 ) {
           'Non-error restart with multiple watched dirs' );
 }
 
-kill 'KILL', $pid;
+kill 9, $pid;
 close $server;
 wait;
 
@@ -185,8 +181,8 @@ sub start_server {
     my $pid = open3(
         undef, $server, undef,
         $^X,   "-I$FindBin::Bin/../lib",
-        "$FindBin::Bin/../t/tmp/TestApp/script/testapp_server.pl", '-port',
-        $port,                                                     '-restart'
+        "$FindBin::Bin/../t/tmp/TestApp/script/testapp_server.pl", '--port',
+        $port,                                                     '--restart'
     ) or die "Unable to spawn standalone HTTP server: $!";
 
     # switch to non-blocking reads so we can fail gracefully instead