From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp33.i.mail.ru (smtp33.i.mail.ru [94.100.177.93]) (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 120DB469719 for ; Mon, 9 Nov 2020 16:10:34 +0300 (MSK) From: "Alexander V. Tikhonov" Date: Mon, 9 Nov 2020 16:10:32 +0300 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH v1] test: fix hang of app/fiber_channel.test.lua test List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kirill Yukhin Cc: tarantool-patches@dev.tarantool.org During testing process: https://gitlab.com/tarantool/tarantool/-/jobs/815901562#L5257 found that test app/fiber_channel.test.lua hanged: --- app/fiber_channel.result Wed Sep 9 08:15:40 2020 +++ var/152_app/fiber_channel.result Wed Oct 28 04:51:34 2020 @@ -211,370 +211,3 @@ - false ... ch:get(box.info.pid) == box.info.pid ---- -- true -... This issue stops the testing till the complete timeout of the test-run will stop all the testing process. To avoid of it 'wait_cond()' routine was added to 'ch:get()' command to set it's local timeout to avoid of waiting for test-run global timeout. Needed for #4961 --- Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-4961-halt_app_fiber_channel Issue: https://github.com/tarantool/tarantool/issues/4961 test/app/fiber_channel.result | 5 ++++- test/app/fiber_channel.test.lua | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/test/app/fiber_channel.result b/test/app/fiber_channel.result index bb6fc30ea..af29a595a 100644 --- a/test/app/fiber_channel.result +++ b/test/app/fiber_channel.result @@ -210,7 +210,10 @@ ch:is_empty() --- - false ... -ch:get(box.info.pid) == box.info.pid +box_info_pid = test_run:wait_cond(function() return ch:get(box.info.pid) end) +--- +... +box_info_pid == box.info.pid --- - true ... diff --git a/test/app/fiber_channel.test.lua b/test/app/fiber_channel.test.lua index 78e176c59..3f4df1504 100644 --- a/test/app/fiber_channel.test.lua +++ b/test/app/fiber_channel.test.lua @@ -58,7 +58,8 @@ ch:put(box.info.pid) ch:count() ch:is_full() ch:is_empty() -ch:get(box.info.pid) == box.info.pid +box_info_pid = test_run:wait_cond(function() return ch:get(box.info.pid) end) +box_info_pid == box.info.pid buffer ch:is_empty() -- 2.25.1