comparison fastcgi_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
33 33
34 http { 34 http {
35 %%TEST_GLOBALS_HTTP%% 35 %%TEST_GLOBALS_HTTP%%
36 36
37 upstream backend { 37 upstream backend {
38 server 127.0.0.1:%%PORT_1%%; 38 server 127.0.0.1:8081;
39 keepalive 1; 39 keepalive 1;
40 } 40 }
41 41
42 server { 42 server {
43 listen 127.0.0.1:%%PORT_0%%; 43 listen 127.0.0.1:8080;
44 server_name localhost; 44 server_name localhost;
45 45
46 location / { 46 location / {
47 fastcgi_pass backend; 47 fastcgi_pass backend;
48 fastcgi_keep_conn on; 48 fastcgi_keep_conn on;
51 } 51 }
52 52
53 EOF 53 EOF
54 54
55 $t->run_daemon(\&fastcgi_test_daemon); 55 $t->run_daemon(\&fastcgi_test_daemon);
56 $t->run()->waitforsocket('127.0.0.1:' . port(1)); 56 $t->run()->waitforsocket('127.0.0.1:' . port(8081));
57 57
58 ############################################################################### 58 ###############################################################################
59 59
60 like(http_get('/'), qr/SEE-THIS/, 'fastcgi request'); 60 like(http_get('/'), qr/SEE-THIS/, 'fastcgi request');
61 like(http_get('/redir'), qr/ 302 /, 'fastcgi redirect'); 61 like(http_get('/redir'), qr/ 302 /, 'fastcgi redirect');
136 } 136 }
137 137
138 sub fastcgi_test_daemon { 138 sub fastcgi_test_daemon {
139 my $server = IO::Socket::INET->new( 139 my $server = IO::Socket::INET->new(
140 Proto => 'tcp', 140 Proto => 'tcp',
141 LocalAddr => '127.0.0.1:' . port(1), 141 LocalAddr => '127.0.0.1:' . port(8081),
142 Listen => 5, 142 Listen => 5,
143 Reuse => 1 143 Reuse => 1
144 ) 144 )
145 or die "Can't create listening socket: $!\n"; 145 or die "Can't create listening socket: $!\n";
146 146