comparison upstream_max_conns.t @ 1393:23cf08e9d2a2

Tests: fixed upstream max_conns test with ip_hash balancer.
author Sergey Kandaurov <pluknet@nginx.com>
date Wed, 07 Nov 2018 14:49:43 +0300
parents 62f06d8dfc63
children 3c101e516213
comparison
equal deleted inserted replaced
1392:dab8b5252216 1393:23cf08e9d2a2
99 } 99 }
100 100
101 upstream u_ih { 101 upstream u_ih {
102 ip_hash; 102 ip_hash;
103 server 127.0.0.1:8081 max_conns=1; 103 server 127.0.0.1:8081 max_conns=1;
104 server 127.0.0.1:8082 max_conns=2;
104 } 105 }
105 106
106 server { 107 server {
107 listen 127.0.0.1:8084; 108 listen 127.0.0.1:8084;
108 server_name localhost; 109 server_name localhost;
195 is(peers('/u_lc_backup_lim', 6), "$p1 $p1 $p2 $p2 $p2 ", 196 is(peers('/u_lc_backup_lim', 6), "$p1 $p1 $p2 $p2 $p2 ",
196 'least_conn backup limited'); 197 'least_conn backup limited');
197 198
198 # ip_hash balancer tests 199 # ip_hash balancer tests
199 200
200 is(parallel('/u_ih', 4), "$p1: 1", 'ip_hash'); 201 is(parallel('/u_ih', 4), "$p1: 1, $p2: 2", 'ip_hash');
201 202
202 ############################################################################### 203 ###############################################################################
203 204
204 sub peers { 205 sub peers {
205 my ($uri, $count) = @_; 206 my ($uri, $count) = @_;