changeset 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 22bade4c7e12
files stream_upstream_least_conn.t
diffstat 1 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/stream_upstream_least_conn.t
+++ b/stream_upstream_least_conn.t
@@ -59,7 +59,17 @@ EOF
 ###############################################################################
 
 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');
 
 ###############################################################################