Mercurial > hg > nginx-tests
comparison proxy_next_upstream_tries.t @ 492:799487ee9aee
Tests: adjusted proxy_next_upstream_timeout values.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Fri, 07 Nov 2014 15:07:26 +0300 |
parents | cbfe90b632e8 |
children | d456ed8a18de |
comparison
equal
deleted
inserted
replaced
491:d5bf5942a8b2 | 492:799487ee9aee |
---|---|
87 proxy_next_upstream_tries 2; | 87 proxy_next_upstream_tries 2; |
88 } | 88 } |
89 | 89 |
90 location /timeout { | 90 location /timeout { |
91 proxy_pass http://u3; | 91 proxy_pass http://u3; |
92 proxy_next_upstream_timeout 1500ms; | 92 proxy_next_upstream_timeout 1900ms; |
93 } | 93 } |
94 | 94 |
95 location /timeout/backup { | 95 location /timeout/backup { |
96 proxy_pass http://u4; | 96 proxy_pass http://u4; |
97 proxy_next_upstream_timeout 1500ms; | 97 proxy_next_upstream_timeout 1900ms; |
98 } | 98 } |
99 | 99 |
100 location /timeout/resolver { | 100 location /timeout/resolver { |
101 resolver 127.0.0.1:8083; | 101 resolver 127.0.0.1:8083; |
102 resolver_timeout 1s; | 102 resolver_timeout 1s; |
103 | 103 |
104 proxy_pass http://$host:8082/backend; | 104 proxy_pass http://$host:8082/backend; |
105 proxy_next_upstream_timeout 1500ms; | 105 proxy_next_upstream_timeout 1900ms; |
106 } | 106 } |
107 | 107 |
108 location /404 { | 108 location /404 { |
109 return 200 x${upstream_status}x; | 109 return 200 x${upstream_status}x; |
110 } | 110 } |
132 | 132 |
133 like(http_get('/tries/resolver'), qr/x404, 404x/, 'tries resolved'); | 133 like(http_get('/tries/resolver'), qr/x404, 404x/, 'tries resolved'); |
134 | 134 |
135 } | 135 } |
136 | 136 |
137 # two tries fit into 1.5s | 137 # two tries fit into 1.9s |
138 | 138 |
139 like(http_get('/timeout'), qr/x404, 404x/, 'timeout'); | 139 like(http_get('/timeout'), qr/x404, 404x/, 'timeout'); |
140 like(http_get('/timeout/backup'), qr/x404, 404x/, 'timeout backup'); | 140 like(http_get('/timeout/backup'), qr/x404, 404x/, 'timeout backup'); |
141 | 141 |
142 TODO: { | 142 TODO: { |