Skip to content

Commit d802dbd

Browse files
committed
tests: fixed more shdict list test cases that could fail on i386.
1 parent 8d0ca58 commit d802dbd

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

t/145-shdict-list.t

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ GET /test
497497

498498
=== TEST 15: list removed: expired
499499
--- http_config
500-
lua_shared_dict dogs 1m;
500+
lua_shared_dict dogs 900k;
501501
--- config
502502
location = /test {
503503
content_by_lua_block {
@@ -566,14 +566,15 @@ loop again, max matched: true
566566

567567
=== TEST 16: list removed: forcibly
568568
--- http_config
569-
lua_shared_dict dogs 1m;
569+
lua_shared_dict dogs 900k;
570570
--- config
571571
location = /test {
572572
content_by_lua_block {
573573
local dogs = ngx.shared.dogs
574574
575-
local max
576-
for i = 1, 20000 do
575+
local N = 200000
576+
local max = 0
577+
for i = 1, N do
577578
local ok, err, forcible = dogs:set(i, i)
578579
if not ok or forcible then
579580
max = i
@@ -592,7 +593,7 @@ loop again, max matched: true
592593
593594
ngx.say("no one left: ", #keys)
594595
595-
for i = 1, 20000 do
596+
for i = 1, N do
596597
local key = string.format("%05d", i)
597598
598599
local len, err = dogs:lpush(key, i)

0 commit comments

Comments
 (0)