Skip to content

Commit 6d99c24

Browse files
committed
tests: t/re-find.t: hardened a few JIT-related tests.
1 parent 05caee4 commit 6d99c24

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

t/re-find.t

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ __DATA__
2525
local from, to, err
2626
local find = ngx.re.find
2727
local s = "a"
28-
for i = 1, 100 do
28+
for i = 1, $TEST_NGINX_HOTLOOP * 20 do
2929
from, to, err = find(s, "a")
3030
end
3131
if err then
@@ -135,7 +135,7 @@ NYI
135135
content_by_lua_block {
136136
local s = "hello, 1234"
137137
local from, to, err
138-
for i = 1, 100 do
138+
for i = 1, $TEST_NGINX_HOTLOOP * 20 do
139139
from, to, err = ngx.re.find(s, "([0-9])|(hello world)", "jo", nil, 2)
140140
end
141141
if from or to then
@@ -203,7 +203,7 @@ qr/\[TRACE\s+\d+ content_by_lua\(nginx\.conf:\d+\):4 loop\]/
203203
content_by_lua_block {
204204
local s = "hello, 1234"
205205
local from, to, err
206-
for i = 1, 100 do
206+
for i = 1, $TEST_NGINX_HOTLOOP * 20 do
207207
from, to, err = ngx.re.find(s, "([0-9])([0-9]+)", "jo", nil, 2)
208208
end
209209
if from then

t/stream/re-find.t

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ __DATA__
2323
local from, to, err
2424
local find = ngx.re.find
2525
local s = "a"
26-
for i = 1, 100 do
26+
for i = 1, $TEST_NGINX_HOTLOOP * 20 do
2727
from, to, err = find(s, "a")
2828
end
2929
if err then
@@ -119,7 +119,7 @@ NYI
119119
content_by_lua_block {
120120
local s = "hello, 1234"
121121
local from, to, err
122-
for i = 1, 100 do
122+
for i = 1, $TEST_NGINX_HOTLOOP * 20 do
123123
from, to, err = ngx.re.find(s, "([0-9])|(hello world)", "jo", nil, 2)
124124
end
125125
if from or to then
@@ -179,7 +179,7 @@ qr/\[TRACE\s+\d+ content_by_lua\(nginx\.conf:\d+\):4 loop\]/
179179
content_by_lua_block {
180180
local s = "hello, 1234"
181181
local from, to, err
182-
for i = 1, 100 do
182+
for i = 1, $TEST_NGINX_HOTLOOP * 20 do
183183
from, to, err = ngx.re.find(s, "([0-9])([0-9]+)", "jo", nil, 2)
184184
end
185185
if from then

0 commit comments

Comments
 (0)