Skip to content
Snippets Groups Projects
Commit 6a8ba4c8 authored by Roman Tsisyk's avatar Roman Tsisyk
Browse files

Merge branch 'stable'

Conflicts:
	src/lua/init.cc
	test/box/fiber.result
	test/box/fiber.test
	test/module/net_sql.mysql.result
	test/module/net_sql.mysql.test
parents c826ea8f 2be3151c
No related branches found
No related tags found
No related merge requests found
......@@ -772,6 +772,8 @@ lbox_fiber_testcancel(struct lua_State *L)
static const struct luaL_reg lbox_fiber_meta [] = {
{"id", lbox_fiber_id},
{"name", lbox_fiber_name},
{"cancel", lbox_fiber_cancel},
{"resume", lbox_fiber_resume},
{"__gc", lbox_fiber_gc},
{NULL, NULL}
};
......
......@@ -811,3 +811,26 @@ box_fiber_run_test()
- 'B: odd 5'
- 'status: dead'
...
function testfun() while true do box.fiber.sleep(10) end end
---
...
f = box.fiber.wrap(testfun)
---
...
f:cancel()
---
...
f:resume()
---
- error: 'fiber.resume(): the fiber is dead'
...
fib_id = box.fiber.wrap(testfun):id()
---
...
box.fiber.find(fib_id):cancel()
---
...
box.fiber.find(fib_id)
---
- null
...
......@@ -273,3 +273,11 @@ space:drop()
dofile("fiber.lua")
-- print run fiber's test
box_fiber_run_test()
function testfun() while true do box.fiber.sleep(10) end end
f = box.fiber.wrap(testfun)
f:cancel()
f:resume()
fib_id = box.fiber.wrap(testfun):id()
box.fiber.find(fib_id):cancel()
box.fiber.find(fib_id)
......@@ -27,6 +27,11 @@ c = box.net.sql.connect('abcd')
---
- error: '../../src/module/sql/sql.lua:29: Unknown driver ''abcd'''
...
c = box.net.sql.connect('mysql')
---
- error: '../../src/module/sql/sql.lua:64: Usage: box.net.sql.connect(''mysql'', host,
port, user, password, db, ...)'
...
function dump(v) return box.cjson.encode(v) end
---
...
......
......@@ -10,6 +10,7 @@ os.execute("cp ../../src/module/mysql/mysql.so box/net/")
require("box.net.mysql")
c = box.net.sql.connect('abcd')
c = box.net.sql.connect('mysql')
function dump(v) return box.cjson.encode(v) end
connect = {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment