From: Sergey Bronnikov via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org
Subject: [Tarantool-patches] [PATCH v7 2/2] luacheck: fix warnings in test/engine_long
Date: Fri, 15 Jan 2021 15:00:08 +0300 [thread overview]
Message-ID: <cced0ff8ce72b934e88241a79804897c5e64b805.1610711373.git.sergeyb@tarantool.org> (raw)
In-Reply-To: <cover.1610711373.git.sergeyb@tarantool.org>
From: Sergey Bronnikov <sergeyb@tarantool.org>
Closes #5650
Reviewed-by: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Reviewed-by: Igor Munkin <imun@tarantool.org>
Co-authored-by: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Co-authored-by: Igor Munkin <imun@tarantool.org>
---
.luacheckrc | 8 +++++++-
test/engine_long/suite.lua | 5 +----
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/.luacheckrc b/.luacheckrc
index d58fd57b0..b581136b2 100644
--- a/.luacheckrc
+++ b/.luacheckrc
@@ -40,7 +40,7 @@ exclude_files = {
-- Unused source file, to be dropped (gh-5169).
"test/box/lua/test_init.lua",
"test/engine/*.test.lua",
- "test/engine_long/**/*.lua",
+ "test/engine_long/*.test.lua",
"test/long_run-py/**/*.lua",
"test/luajit-tap/**/*.lua",
"test/replication/**/*.lua",
@@ -176,3 +176,9 @@ files["test/box-tap/extended_error.test.lua"] = {
"forbidden_function",
},
}
+files["test/engine_long/suite.lua"] = {
+ globals = {
+ "delete_replace_update",
+ "delete_insert",
+ }
+}
diff --git a/test/engine_long/suite.lua b/test/engine_long/suite.lua
index 9ac2bff9f..586160a1a 100644
--- a/test/engine_long/suite.lua
+++ b/test/engine_long/suite.lua
@@ -2,7 +2,7 @@ local function string_function()
local random_number
local random_string
random_string = ""
- for x = 1,20,1 do
+ for _ = 1,20,1 do
random_number = math.random(65, 90)
random_string = random_string .. string.char(random_number)
end
@@ -10,7 +10,6 @@ local function string_function()
end
function delete_replace_update(engine_name, iterations)
- local string_value
if (box.space._space.index.name:select{'tester'}[1] ~= nil) then
box.space.tester:drop()
end
@@ -40,7 +39,6 @@ function delete_replace_update(engine_name, iterations)
random_number = math.random(1,6)
string_value_3 = string_function()
--- print('<'..counter..'> [' .. random_number .. '] value_2: ' .. string_value_2 .. ' value_3: ' .. string_value_3)
if random_number == 1 then
box.space.tester:delete{string_value_2}
end
@@ -69,7 +67,6 @@ function delete_replace_update(engine_name, iterations)
end
function delete_insert(engine_name, iterations)
- local string_value
if (box.space._space.index.name:select{'tester'}[1] ~= nil) then
box.space.tester:drop()
end
--
2.25.1
next prev parent reply other threads:[~2021-01-15 12:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-15 12:00 [Tarantool-patches] [PATCH v7 0/2] Fix luacheck warnings in test/engine and test/engine_long Sergey Bronnikov via Tarantool-patches
2021-01-15 12:00 ` [Tarantool-patches] [PATCH v7 1/2] luacheck: fix warnings in test/engine Sergey Bronnikov via Tarantool-patches
2021-01-15 12:00 ` Sergey Bronnikov via Tarantool-patches [this message]
2021-01-17 16:22 ` [Tarantool-patches] [PATCH v7 2/2] luacheck: fix warnings in test/engine_long Vladislav Shpilevoy via Tarantool-patches
2021-01-18 8:54 ` Sergey Bronnikov via Tarantool-patches
2021-01-20 22:40 ` Vladislav Shpilevoy via Tarantool-patches
2021-01-21 15:36 ` [Tarantool-patches] [PATCH v7 0/2] Fix luacheck warnings in test/engine and test/engine_long Kirill Yukhin via Tarantool-patches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cced0ff8ce72b934e88241a79804897c5e64b805.1610711373.git.sergeyb@tarantool.org \
--to=tarantool-patches@dev.tarantool.org \
--cc=sergeyb@tarantool.org \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH v7 2/2] luacheck: fix warnings in test/engine_long' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox