test: make plugin/log-rotate2.t stable (#6654)

This commit is contained in:
罗泽轩 2022-03-20 14:34:34 +08:00 committed by GitHub
parent feb55d348e
commit 6bb9feac82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -155,6 +155,7 @@ plugin_attr:
--- config
location /t {
content_by_lua_block {
ngx.sleep(0.1)
local log_file = ngx.config.prefix() .. "logs/error.log"
local file = io.open(log_file, "r")
local log = file:read("*a")