This is an automated email from the ASF dual-hosted git repository.
tokers pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new e748b71 test: make t/plugin/log-rotate.t stable (#4218)
e748b71 is described below
commit e748b71db1378ee7dd720668157f12af04df412d
Author: 罗泽轩 <[email protected]>
AuthorDate: Wed May 12 11:14:13 2021 +0800
test: make t/plugin/log-rotate.t stable (#4218)
Signed-off-by: spacewander <[email protected]>
---
t/plugin/log-rotate.t | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/t/plugin/log-rotate.t b/t/plugin/log-rotate.t
index 7ed8333..73c6b50 100644
--- a/t/plugin/log-rotate.t
+++ b/t/plugin/log-rotate.t
@@ -163,7 +163,7 @@ plugins:
ngx.status = code
ngx.say(org_body)
- ngx.sleep(1.5)
+ ngx.sleep(2.1) -- make sure two files will be rotated out if we
don't disable it
local n_split_error_file = 0
local lfs = require("lfs")
@@ -173,11 +173,13 @@ plugins:
end
end
- ngx.say(n_split_error_file)
+ -- Before hot reload, the log rotate may or may not take effect.
+ -- It depends on the time we start the test
+ ngx.say(n_split_error_file <= 1)
}
}
--- response_body
done
-1
+true
--- no_error_log
[error]