Mercurial > hg > nginx-tests
comparison scgi_cache.t @ 952:e9064d691790
Tests: converted tests to run in parallel.
author | Andrey Zelenkov <zelenkov@nginx.com> |
---|---|
date | Tue, 21 Jun 2016 16:39:13 +0300 |
parents | fa71c725d40a |
children | d4a0232425ee |
comparison
equal
deleted
inserted
replaced
951:9361c7eddfc1 | 952:e9064d691790 |
---|---|
42 scgi_cache_key $request_uri; | 42 scgi_cache_key $request_uri; |
43 | 43 |
44 add_header X-Cache-Status $upstream_cache_status; | 44 add_header X-Cache-Status $upstream_cache_status; |
45 | 45 |
46 server { | 46 server { |
47 listen 127.0.0.1:8080; | 47 listen 127.0.0.1:%%PORT_0%%; |
48 server_name localhost; | 48 server_name localhost; |
49 | 49 |
50 location / { | 50 location / { |
51 scgi_pass 127.0.0.1:8081; | 51 scgi_pass 127.0.0.1:%%PORT_1%%; |
52 scgi_param SCGI 1; | 52 scgi_param SCGI 1; |
53 scgi_param REQUEST_URI $uri; | 53 scgi_param REQUEST_URI $uri; |
54 scgi_cache one; | 54 scgi_cache one; |
55 } | 55 } |
56 } | 56 } |
81 ############################################################################### | 81 ############################################################################### |
82 | 82 |
83 sub scgi_daemon { | 83 sub scgi_daemon { |
84 my $server = IO::Socket::INET->new( | 84 my $server = IO::Socket::INET->new( |
85 Proto => 'tcp', | 85 Proto => 'tcp', |
86 LocalHost => '127.0.0.1:8081', | 86 LocalHost => '127.0.0.1:' . port(1), |
87 Listen => 5, | 87 Listen => 5, |
88 Reuse => 1 | 88 Reuse => 1 |
89 ) | 89 ) |
90 or die "Can't create listening socket: $!\n"; | 90 or die "Can't create listening socket: $!\n"; |
91 | 91 |