[Tarantool-patches] [PATCH v2] test: cleanup box/net.box_call_blocks_gh-946
Alexander V. Tikhonov
avtikhon at tarantool.org
Fri Jul 3 17:23:26 MSK 2020
Found issue with 'readahead limit is reached':
iproto iproto.cc:606 W> stopping input on connection fd 23, aka unix/:(socket), peer of unix/:(socket), readahead limit is reached
While the test doesn't check it. To fix the issue increased
'readahead' value.
Found issue at the tests running after the current test:
main/435/console/unix/: utils.c:1005 E> LuajitError: [string "function on_disconnect() disconnected = true ..."]:1: assign to undeclared variable 'disconnected'
Found that the root cause of the issue, that tests run on the same
worker, in this case function on_disconnected must be cleaned.
Also clean up of the test at its end improved.
---
Github: https://github.com/tarantool/tarantool/tree/avtikhon/cleanup_test_box_call_blocks
V1: https://lists.tarantool.org/pipermail/tarantool-patches/2020-June/018020.html
test/box/net.box_call_blocks_gh-946.result | 30 ++++++++++++++++++++
test/box/net.box_call_blocks_gh-946.test.lua | 12 ++++++++
2 files changed, 42 insertions(+)
diff --git a/test/box/net.box_call_blocks_gh-946.result b/test/box/net.box_call_blocks_gh-946.result
index 2f6d5fcf2..d9d868ce1 100644
--- a/test/box/net.box_call_blocks_gh-946.result
+++ b/test/box/net.box_call_blocks_gh-946.result
@@ -11,6 +11,12 @@ test_run:cmd('create server connecter with script = "box/proxy.lua"')
---
- true
...
+readahead = box.cfg.readahead
+---
+...
+box.cfg{readahead = 100 * 1024}
+---
+...
--
-- gh-946: long polling CALL blocks input
--
@@ -117,3 +123,27 @@ box.session.on_disconnect(on_disconnect) == on_disconnect
---
- true
...
+c:close()
+---
+...
+box.schema.user.revoke('guest', 'execute', 'function', 'fast_call')
+---
+...
+box.schema.user.revoke('guest', 'execute', 'function', 'long_call')
+---
+...
+box.schema.user.revoke('guest', 'execute', 'function', 'wait_signal')
+---
+...
+box.schema.func.drop('fast_call')
+---
+...
+box.schema.func.drop('long_call')
+---
+...
+box.schema.func.drop('wait_signal')
+---
+...
+box.cfg{readahead = readahead}
+---
+...
diff --git a/test/box/net.box_call_blocks_gh-946.test.lua b/test/box/net.box_call_blocks_gh-946.test.lua
index 541541eda..951919737 100644
--- a/test/box/net.box_call_blocks_gh-946.test.lua
+++ b/test/box/net.box_call_blocks_gh-946.test.lua
@@ -5,6 +5,9 @@ net = require('net.box')
test_run:cmd('create server connecter with script = "box/proxy.lua"')
+readahead = box.cfg.readahead
+box.cfg{readahead = 100 * 1024}
+
--
-- gh-946: long polling CALL blocks input
--
@@ -61,3 +64,12 @@ collectgarbage('collect')
fiber.sleep(0)
box.session.on_disconnect(on_disconnect) == on_disconnect
+
+c:close()
+box.schema.user.revoke('guest', 'execute', 'function', 'fast_call')
+box.schema.user.revoke('guest', 'execute', 'function', 'long_call')
+box.schema.user.revoke('guest', 'execute', 'function', 'wait_signal')
+box.schema.func.drop('fast_call')
+box.schema.func.drop('long_call')
+box.schema.func.drop('wait_signal')
+box.cfg{readahead = readahead}
--
2.17.1
More information about the Tarantool-patches
mailing list