Skip to content

Commit da7c53a

Browse files
committed
test: the CPU may be slow, need to wait a long time.
1 parent 8e2954e commit da7c53a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

t/key.t

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,12 @@ checked val as expect: abc
227227
local res2, err = etcd:wait("/test", res.body.node.modifiedIndex + 1, 1)
228228
ngx.say("err: ", err, ", more than 1sec: ", ngx.now() - cur_time > 1)
229229

230-
ngx.timer.at(1, function ()
230+
ngx.timer.at(1.5, function ()
231231
etcd:set("/test", "bcd")
232232
end)
233233

234234
cur_time = ngx.now()
235-
res, err = etcd:wait("/test", res.body.node.modifiedIndex + 1, 5)
235+
res, err = etcd:wait("/test", res.body.node.modifiedIndex + 1, 3)
236236
check_res(res, err, "bcd")
237237
ngx.say("wait more than 1sec: ", ngx.now() - cur_time > 1)
238238
}
@@ -246,6 +246,7 @@ checked val as expect: abc
246246
err: timeout, more than 1sec: true
247247
checked val as expect: bcd
248248
wait more than 1sec: true
249+
--- timeout: 5
249250

250251

251252

0 commit comments

Comments
 (0)