[Tarantool-patches] [PATCH 06/19] Fix luacheck warnings in test/engine

sergeyb at tarantool.org sergeyb at tarantool.org
Thu Jul 16 17:11:30 MSK 2020


From: Sergey Bronnikov <sergeyb at tarantool.org>

Part of #4681

Reviewed-by: Vladislav Shpilevoy <v.shpilevoy at tarantool.org>
Reviewed-by: Igor Munkin <imun at tarantool.org>

Co-authored-by: Vladislav Shpilevoy <v.shpilevoy at tarantool.org>
Co-authored-by: Igor Munkin <imun at tarantool.org>
---
 .luacheckrc              | 7 ++++++-
 test/engine/box.lua      | 8 +-------
 test/engine/conflict.lua | 6 +++---
 3 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/.luacheckrc b/.luacheckrc
index 73f347d68..e0446f9be 100644
--- a/.luacheckrc
+++ b/.luacheckrc
@@ -41,7 +41,7 @@ exclude_files = {
     "test/box/lua/require_mod.lua",
     -- Unused source file, to be dropped (gh-5169).
     "test/box/lua/test_init.lua",
-    "test/engine/**/*.lua",
+    "test/engine/*.test.lua",
     "test/engine_long/*.lua",
     "test/long_run-py/**/*.lua",
     "test/replication/**/*.lua",
@@ -158,3 +158,8 @@ files["test/box-tap/extended_error.test.lua"] = {
         "forbidden_function",
     },
 }
+files["test/engine/conflict.lua"] = {
+    globals = {
+        "test_conflict",
+    },
+}
diff --git a/test/engine/box.lua b/test/engine/box.lua
index e2f04cba2..8558c9ac0 100644
--- a/test/engine/box.lua
+++ b/test/engine/box.lua
@@ -1,11 +1,5 @@
 #!/usr/bin/env tarantool
-os = require('os')
-
-local vinyl = {
-    threads = 3,
-    range_size=1024*64,
-    page_size=1024,
-}
+local os = require('os')
 
 box.cfg{
     listen              = os.getenv("LISTEN"),
diff --git a/test/engine/conflict.lua b/test/engine/conflict.lua
index b757b81d2..56c70f6ff 100644
--- a/test/engine/conflict.lua
+++ b/test/engine/conflict.lua
@@ -5,7 +5,7 @@ function test_conflict()
     local engine = inspector:get_cfg('engine')
 
     local s = box.schema.space.create('tester', {engine=engine});
-    local i = s:create_index('test_index', {type = 'tree', parts = {1, 'string'}});
+    s:create_index('test_index', {type = 'tree', parts = {1, 'string'}});
 
     local commits = 0
     local function conflict()
@@ -16,8 +16,8 @@ function test_conflict()
     end;
 
     local fiber = require('fiber');
-    local f0 = fiber.create(conflict);
-    local f1 = fiber.create(conflict); -- conflict
+    fiber.create(conflict);
+    fiber.create(conflict); -- conflict
     fiber.sleep(0);
 
     s:drop();
-- 
2.26.2



More information about the Tarantool-patches mailing list