comparison 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 06fbf6269f38
children
comparison
equal deleted inserted replaced
1692:f6795e2e6a4b 1693:5ac6efbe5552
178 like(many('/?a=1', 10), qr/($p1|$p2|$p3): 10/, 'stable hash'); 178 like(many('/?a=1', 10), qr/($p1|$p2|$p3): 10/, 'stable hash');
179 like(many('/c?a=1', 10), qr/($p1|$p2|$p3): 10/, 'stable hash - consistent'); 179 like(many('/c?a=1', 10), qr/($p1|$p2|$p3): 10/, 'stable hash - consistent');
180 180
181 # fallback to round-robin 181 # fallback to round-robin
182 182
183 TODO: {
184 local $TODO = 'not yet' unless $t->has_version('1.17.1');
185
186 like(many('/?a=', 6), qr/$p1: 2, $p2: 2, $p3: 2/, 'empty key'); 183 like(many('/?a=', 6), qr/$p1: 2, $p2: 2, $p3: 2/, 'empty key');
187 like(many('/c?a=', 6), qr/$p1: 2, $p2: 2, $p3: 2/, 'empty key - consistent'); 184 like(many('/c?a=', 6), qr/$p1: 2, $p2: 2, $p3: 2/, 'empty key - consistent');
188
189 }
190 185
191 my @res = iter('/', 10); 186 my @res = iter('/', 10);
192 187
193 is(@res, 10, 'all hashed peers'); 188 is(@res, 10, 'all hashed peers');
194 189