From 3ad43b2b98ccac67c775141ef358d156e7d499cb Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Thu, 25 Mar 2021 16:29:33 +0300 Subject: [PATCH] test_run:wait_log - drop redundant assert The callee wait_cond does setup timeout by self in case if not provided | local function wait_cond(self, cond, timeout, delay) | ... | local timeout = timeout or 60 | ... | end | | local function wait_log(self, node, what, bytes, timeout, opts) | ... | return wait_cond(self, cond, timeout, delay) | end so no need to verify if timeout is provided in wait_log args. @Totktonada: The wait_cond() and wait_log() helpers were added in [1] without a default timeout: so they assert that a caller provides it. Later, in [2], the default timeout was added for wait_cond(). Here we forgot to drop the assertion from wait_log(). [1]: 670f330aacaf44bc8b1f969fa0cd5f811c5ceb1b ('test: wait for logs') [2]: fe9ca2e768f3773a57d5cb905adaec931b0cb275 ('Add default timeout for wait_cond routine') Signed-off-by: Cyrill Gorcunov --- test_run.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/test_run.lua b/test_run.lua index 5c29ec9f..4a68341d 100644 --- a/test_run.lua +++ b/test_run.lua @@ -426,8 +426,6 @@ end -- Wrapper for grep_log, wait until expected log entry is appear -- in a server log file. local function wait_log(self, node, what, bytes, timeout, opts) - assert(timeout ~= nil) - local opts = opts or {} local delay = opts.delay