comparison t/memcached-keepalive.t @ 20:8d8eaaf07663

Keepalive: tests cleanup.
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 10 Sep 2010 13:39:15 +0400
parents 2ce9d8a1ca93
children 2ee28064a04a
comparison
equal deleted inserted replaced
19:2ce9d8a1ca93 20:8d8eaaf07663
21 plan(skip_all => 'Cache::Memcached not installed') if $@; 21 plan(skip_all => 'Cache::Memcached not installed') if $@;
22 22
23 my $t = Test::Nginx->new()->has('rewrite')->has_daemon('memcached')->plan(16) 23 my $t = Test::Nginx->new()->has('rewrite')->has_daemon('memcached')->plan(16)
24 ->write_file_expand('nginx.conf', <<'EOF'); 24 ->write_file_expand('nginx.conf', <<'EOF');
25 25
26 %%TEST_GLOBALS%%
27
26 master_process off; 28 master_process off;
27 daemon off; 29 daemon off;
28 30
29 events { 31 events {
30 worker_connections 1024;
31 } 32 }
32 33
33 http { 34 http {
34 access_log off; 35 %%TEST_GLOBALS_HTTP%%
35
36 client_body_temp_path %%TESTDIR%%/client_body_temp;
37 fastcgi_temp_path %%TESTDIR%%/fastcgi_temp;
38 proxy_temp_path %%TESTDIR%%/proxy_temp;
39 36
40 upstream memd { 37 upstream memd {
41 server 127.0.0.1:8081; 38 server 127.0.0.1:8081;
42 keepalive 1; 39 keepalive 1;
43 } 40 }
59 server 127.0.0.1:8082; 56 server 127.0.0.1:8082;
60 keepalive 10; 57 keepalive 10;
61 } 58 }
62 59
63 server { 60 server {
64 listen localhost:8080; 61 listen 127.0.0.1:8080;
65 server_name localhost; 62 server_name localhost;
66 63
67 location / { 64 location / {
68 set $memcached_key $uri; 65 set $memcached_key $uri;
69 memcached_pass memd; 66 memcached_pass memd;