Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

This test sporadically fails, so enhance the error message for more i…

…nfo.

Also alter the test slightly, hoping it fixes the random failures.
  • Loading branch information...
commit f8288640e3bf979d85865635c304643c2f63a6e5 1 parent cd498bd
@rjray authored
Showing with 3 additions and 4 deletions.
  1. +1 −1  lib/RPC/XML/Server.pm
  2. +2 −3 t/41_server_hang.t
View
2  lib/RPC/XML/Server.pm
@@ -166,7 +166,7 @@ sub new ## no critic (ProhibitExcessComplexity)
);
if (! $http)
{
- return "${class}::new: Unable to create HTTP::Daemon object";
+ return "${class}::new: Unable to create HTTP::Daemon object: $@";
}
$URI = URI->new($http->url);
$self->{__host} = $URI->host;
View
5 t/41_server_hang.t
@@ -40,14 +40,13 @@ require File::Spec->catfile($dir, 'util.pl');
SKIP: {
skip "This suite does not run on MSWin", 2 if ($^O eq "MSWin32");
- die "No usable port found between 9000 and 10000, skipping"
- if (($port = find_port) == -1);
- $srv = MyServer->new(no_default => 1, port => $port);
+ $srv = MyServer->new(no_default => 1);
isa_ok($srv, 'RPC::XML::Server', 'Server instance');
$srv->add_method({ name => 'echo',
signature => [ 'string string' ],
code => sub { shift; return shift; } });
+ $port = $srv->port;
$req = HTTP::Request->new(POST => "http://localhost:$port/");
$body = RPC::XML::request->new('echo', 'foo')->as_string;
$req->content($body);
Please sign in to comment.
Something went wrong with that request. Please try again.