From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 03B3441D952 for ; Fri, 3 Jul 2020 18:44:31 +0300 (MSK) From: "Alexander V. Tikhonov" Date: Fri, 3 Jul 2020 18:44:26 +0300 Message-Id: <0927ae47a8dd5afa002055234fff40f1ecbc5a16.1593790113.git.avtikhon@tarantool.org> Subject: [Tarantool-patches] [PATCH v2] test: cleanup box/net.box_call_blocks_gh-946 List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kirill Yukhin , Alexander Turenko Cc: tarantool-patches@dev.tarantool.org 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: [001] --- box/net.box_disconnect_gh-3859.result Tue Jun 30 19:16:28 2020 [001] +++ box/net.box_disconnect_gh-3859.reject Fri Jul 3 17:38:22 2020 [001] @@ -97,7 +97,7 @@ [001] ... [001] disconnected -- nil, on_disconnect is not called second time. [001] --- [001] -- null [001] +- true [001] ... [001] box.session.on_disconnect(nil, on_disconnect) [001] --- [001] 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. Closes #5133 --- Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-5133_cleanup_test_box_call_blocks Issue: https://github.com/tarantool/tarantool/issues/5133 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