changeset 253:f440a8acbf39

Tests: report connection errors.
author Maxim Dounin <mdounin@mdounin.ru>
date Tue, 29 Jan 2013 19:25:27 +0400
parents 8b554d26eb1a
children 0cc5269bc62c
files lib/Test/Nginx.pm
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lib/Test/Nginx.pm
+++ b/lib/Test/Nginx.pm
@@ -409,7 +409,8 @@ sub http($;%) {
 		my $s = $extra{socket} || IO::Socket::INET->new(
 			Proto => 'tcp',
 			PeerAddr => '127.0.0.1:8080'
-		);
+		)
+			or die "Can't connect to nginx: $!\n";
 		log_out($request);
 		$s->print($request);
 		local $/;