comparison proxy_keepalive.t @ 974:882267679006

Tests: simplified parallel modifications in tests. Mail tests were simplified in c227348453db.
author Andrey Zelenkov <zelenkov@nginx.com>
date Tue, 12 Jul 2016 17:39:03 +0300
parents e9064d691790
children
comparison
equal deleted inserted replaced
973:7d7aef8b9f3a 974:882267679006
36 36
37 http { 37 http {
38 %%TEST_GLOBALS_HTTP%% 38 %%TEST_GLOBALS_HTTP%%
39 39
40 upstream backend { 40 upstream backend {
41 server 127.0.0.1:%%PORT_1%%; 41 server 127.0.0.1:8081;
42 keepalive 1; 42 keepalive 1;
43 } 43 }
44 44
45 server { 45 server {
46 listen 127.0.0.1:%%PORT_0%%; 46 listen 127.0.0.1:8080;
47 server_name localhost; 47 server_name localhost;
48 48
49 proxy_http_version 1.1; 49 proxy_http_version 1.1;
50 proxy_set_header Connection ""; 50 proxy_set_header Connection "";
51 51
72 'set: <!--#echo var="x" -->'); 72 'set: <!--#echo var="x" -->');
73 73
74 $t->run_daemon(\&http_daemon); 74 $t->run_daemon(\&http_daemon);
75 $t->run(); 75 $t->run();
76 76
77 $t->waitforsocket('127.0.0.1:' . port(1)) 77 $t->waitforsocket('127.0.0.1:' . port(8081))
78 or die "Can't start test backend"; 78 or die "Can't start test backend";
79 79
80 ############################################################################### 80 ###############################################################################
81 81
82 # There are 3 mostly independent modes of upstream operation: 82 # There are 3 mostly independent modes of upstream operation:
213 ############################################################################### 213 ###############################################################################
214 214
215 sub http_daemon { 215 sub http_daemon {
216 my $server = IO::Socket::INET->new( 216 my $server = IO::Socket::INET->new(
217 Proto => 'tcp', 217 Proto => 'tcp',
218 LocalHost => '127.0.0.1:' . port(1), 218 LocalHost => '127.0.0.1:' . port(8081),
219 Listen => 5, 219 Listen => 5,
220 Reuse => 1 220 Reuse => 1
221 ) 221 )
222 or die "Can't create listening socket: $!\n"; 222 or die "Can't create listening socket: $!\n";
223 223