From: "Alexander V. Tikhonov" <avtikhon@tarantool.org>
To: Kirill Yukhin <kyukhin@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: [Tarantool-patches] [PATCH v1] test: fix hang of app/fiber_channel.test.lua test
Date: Mon, 9 Nov 2020 16:10:32 +0300 [thread overview]
Message-ID: <fc4792fc49b0b8699812d6754ce1fddd9294a078.1604927377.git.avtikhon@tarantool.org> (raw)
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
reply other threads:[~2020-11-09 13:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fc4792fc49b0b8699812d6754ce1fddd9294a078.1604927377.git.avtikhon@tarantool.org \
--to=avtikhon@tarantool.org \
--cc=kyukhin@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH v1] test: fix hang of app/fiber_channel.test.lua test' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox