[Tarantool-patches] [PATCH v1] test: fix hang of app/fiber_channel.test.lua test

Alexander V. Tikhonov avtikhon at tarantool.org
Mon Nov 9 16:10:32 MSK 2020


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



More information about the Tarantool-patches mailing list