diff proxy_request_buffering_ssl.t @ 837:68a6678abae2

Tests: improved logging for unbuffered request body tests.
author Sergey Kandaurov <pluknet@nginx.com>
date Fri, 29 Jan 2016 16:12:42 +0300
parents 907e89fba9c3
children e9064d691790
line wrap: on
line diff
--- a/proxy_request_buffering_ssl.t
+++ b/proxy_request_buffering_ssl.t
@@ -228,6 +228,8 @@ EOF
 
 		$client = $server->accept();
 
+		log2c("(new connection $client)");
+
 		alarm(0);
 	};
 	alarm(0);
@@ -237,6 +239,8 @@ EOF
 	}
 
 	$client->sysread(my $buf, 1024);
+	log2i($buf);
+
 	$buf =~ s/.*?\x0d\x0a?\x0d\x0a?(.*)/$1/ms;
 
 	my $f = { preread => $buf };
@@ -248,8 +252,11 @@ EOF
 			local $SIG{PIPE} = sub { die "sigpipe\n" };
 			alarm(5);
 
+			log_out($buf);
 			$s->write($buf);
+
 			$client->sysread($buf, 1024);
+			log2i($buf);
 
 			alarm(0);
 		};
@@ -280,6 +287,7 @@ EOF
 			alarm(5);
 
 			$s->sysread($buf, 1024);
+			log_in($buf);
 
 			alarm(0);
 		};
@@ -294,4 +302,8 @@ EOF
 	return $f;
 }
 
+sub log2i { Test::Nginx::log_core('|| <<', @_); }
+sub log2o { Test::Nginx::log_core('|| >>', @_); }
+sub log2c { Test::Nginx::log_core('||', @_); }
+
 ###############################################################################