# HG changeset patch # User Sergey Kandaurov # Date 1431593664 -10800 # Node ID ca54b445d9826c0e4212aef87da9f0ebc7430469 # Parent 5c3946ebd867393257e7a2f2e4b8a3541a6b3eff Tests: masked nginx bug in proxy next upstream. When iterating through several next upstreams per a worker cycle, a previously reported event about upstream connection error may be improperly applied to the next upstream, thus leading to the invalid connection error. E.g., in kqueue, where the problem is visible, this is caused by "ev->instance" that does not tolerate more than one next upstream at once, and kevents placed on the kqueue separately for read and write events. The change is to limit test case to the only one next upstream. diff --git a/stream_proxy_next_upstream.t b/stream_proxy_next_upstream.t --- a/stream_proxy_next_upstream.t +++ b/stream_proxy_next_upstream.t @@ -42,6 +42,11 @@ stream { server 127.0.0.1:8089 backup; } + upstream u2 { + server 127.0.0.1:8087; + server 127.0.0.1:8089 backup; + } + proxy_connect_timeout 1s; server { @@ -52,7 +57,7 @@ stream { server { listen 127.0.0.1:8082; - proxy_pass u; + proxy_pass u2; proxy_next_upstream on; }