added more error info and keep test cases.
This commit is contained in:
parent
c782f22c5d
commit
8ea7501d8b
2 changed files with 32 additions and 19 deletions
|
|
@ -2,8 +2,8 @@ describe("lua_ingress", function()
|
|||
it("patches math.randomseed to not be called more than once per worker", function()
|
||||
local s = spy.on(ngx, "log")
|
||||
|
||||
math.randomseed()
|
||||
math.randomseed(100)
|
||||
assert.spy(s).was_called_with(ngx.WARN,
|
||||
string.format("ignoring math.randomseed() since PRNG is already seeded for worker %d", ngx.worker.pid()))
|
||||
string.format("ignoring math.randomseed(%d) since PRNG is already seeded for worker %d", 100, ngx.worker.pid()))
|
||||
end)
|
||||
end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue