changeset 572:ca54b445d982

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.
author Sergey Kandaurov <pluknet@nginx.com>
date Thu, 14 May 2015 11:54:24 +0300
parents 5c3946ebd867
children 517cde5075d8
files stream_proxy_next_upstream.t
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;
     }