Skip to content

Commit

Permalink
luacheck: fix warnings in test/app
Browse files Browse the repository at this point in the history
Closes #5454

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>
  • Loading branch information
3 people committed Dec 24, 2020
1 parent 777dbb9 commit 778eafd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ exclude_files = {
-- Third-party source code.
"src/box/lua/serpent.lua",
"test-run/**/*.lua",
"test/app/**/*.lua",
"test/app/*.test.lua",
"test/box/**/*.lua",
"test/box-py/**/*.lua",
"test/box-tap/**/*.lua",
Expand Down
4 changes: 2 additions & 2 deletions test/app/fiber.result
Original file line number Diff line number Diff line change
Expand Up @@ -560,11 +560,11 @@ space:drop()
---
...
-- box.fiber test (create, resume, yield, status)
dofile("fiber.lua")
f = dofile("fiber.lua")
---
...
-- print run fiber's test
box_fiber_run_test()
f()
---
- - 'A: odd 1'
- 'tester: status(printer) = suspended'
Expand Down
4 changes: 2 additions & 2 deletions test/app/fiber.test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,9 @@ fiber.self():name(old_name)
space:drop()

-- box.fiber test (create, resume, yield, status)
dofile("fiber.lua")
f = dofile("fiber.lua")
-- print run fiber's test
box_fiber_run_test()
f()
-- various...
function testfun() while true do fiber.sleep(10) end end
f = fiber.create(testfun)
Expand Down
4 changes: 3 additions & 1 deletion test/app/lua/fiber.lua
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,13 @@ end
-- -------------------------------------------------------------------------- --

-- run fiber test
function box_fiber_run_test()
local function box_fiber_run_test()
-- run tester
tester_task = fiber.create(tester_task_routine)
while tester_task:status() ~= 'dead' do
fiber.sleep(0)
end
return result
end

return box_fiber_run_test

0 comments on commit 778eafd

Please sign in to comment.