Mercurial > hg > nginx-tests
diff stream_upstream_least_conn.t @ 566:4296379213c8
Tests: refactored stream least_conn tests similar to e4ff43e00d84.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Wed, 29 Apr 2015 15:53:58 +0300 |
parents | ff49e1c00b35 |
children | 824754da4afc |
line wrap: on
line diff
--- a/stream_upstream_least_conn.t Wed Apr 29 14:58:27 2015 +0300 +++ b/stream_upstream_least_conn.t Wed Apr 29 15:53:58 2015 +0300 @@ -59,7 +59,17 @@ ############################################################################### is(many('.', 10), '8081: 5, 8082: 5', 'balanced'); -is(parallel('w', 10), '8081: 1, 8082: 9', 'least_conn'); + +my @sockets; +for (1 .. 2) { + my $s = stream_connect(); + stream_write($s, 'w'); + push @sockets, $s; +} + +select undef, undef, undef, 0.2; + +is(many('.', 10), '8082: 10', 'least_conn'); ###############################################################################