comparison stream_upstream_hash.t @ 1693:5ac6efbe5552

Tests: removed TODO and try_run() checks for legacy versions.
author Sergey Kandaurov <pluknet@nginx.com>
date Tue, 01 Jun 2021 16:40:18 +0300
parents f3ba4c74de31
children
comparison
equal deleted inserted replaced
1692:f6795e2e6a4b 1693:5ac6efbe5552
100 is(many(10, port(8080)), "$port3: 10", 'hash'); 100 is(many(10, port(8080)), "$port3: 10", 'hash');
101 like(many(10, port(8081)), qr/($port2|$port3): 10/, 'hash consistent'); 101 like(many(10, port(8081)), qr/($port2|$port3): 10/, 'hash consistent');
102 102
103 # fallback to round-robin 103 # fallback to round-robin
104 104
105 TODO: {
106 local $TODO = 'not yet' unless $t->has_version('1.17.1');
107
108 like(many(4, port(8084)), qr/$port2: 2, $port3: 2/, 'empty key'); 105 like(many(4, port(8084)), qr/$port2: 2, $port3: 2/, 'empty key');
109 like(many(4, port(8085)), qr/$port2: 2, $port3: 2/, 'empty key - consistent'); 106 like(many(4, port(8085)), qr/$port2: 2, $port3: 2/, 'empty key - consistent');
110
111 }
112 107
113 ############################################################################### 108 ###############################################################################
114 109
115 sub many { 110 sub many {
116 my ($count, $port) = @_; 111 my ($count, $port) = @_;