Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH v1] test: fix hang of app/fiber_channel.test.lua test
@ 2020-11-09 13:10 Alexander V. Tikhonov
  0 siblings, 0 replies; only message in thread
From: Alexander V. Tikhonov @ 2020-11-09 13:10 UTC (permalink / raw)
  To: Kirill Yukhin; +Cc: tarantool-patches

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-11-09 13:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-09 13:10 [Tarantool-patches] [PATCH v1] test: fix hang of app/fiber_channel.test.lua test Alexander V. Tikhonov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox