From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (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 A1AAA41C622 for ; Fri, 3 Jul 2020 17:23:28 +0300 (MSK) From: "Alexander V. Tikhonov" Date: Fri, 3 Jul 2020 17:23:26 +0300 Message-Id: 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: 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