Tarantool development patches archive
 help / color / mirror / Atom feed
* [PATCH] test: fix app/fiber.test.lua flaky fails
@ 2018-12-02 17:05 Alexander Turenko
  2018-12-03  8:42 ` Vladimir Davydov
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Turenko @ 2018-12-02 17:05 UTC (permalink / raw)
  To: Vladimir Davydov; +Cc: Alexander Turenko, tarantool-patches

Fixes #3852.
---

https://github.com/tarantool/tarantool/issues/3852
https://github.com/tarantool/tarantool/tree/Totktonada/gh-3852-fix-flaky-app-fiber-test-lua

The branch is based on top of 2.1. Please, cherry-pick the fix to 1.10
too.

 test/app/fiber.result   | 9 +++++----
 test/app/fiber.test.lua | 6 ++++--
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/test/app/fiber.result b/test/app/fiber.result
index 8c050cc59..ab7c1941b 100644
--- a/test/app/fiber.result
+++ b/test/app/fiber.result
@@ -1105,9 +1105,6 @@ function test5()
 end;
 ---
 ...
-local status;
----
-...
 f, status = test5();
 ---
 ...
@@ -1142,8 +1139,12 @@ status;
 ---
 - suspended
 ...
-f:status();
+test_run:wait_cond(function()
+    status = f:status()
+    return status == 'dead', status
+end, 10);
 ---
+- true
 - dead
 ...
 -- test side fiber in transaction
diff --git a/test/app/fiber.test.lua b/test/app/fiber.test.lua
index 69a582546..2762047e4 100644
--- a/test/app/fiber.test.lua
+++ b/test/app/fiber.test.lua
@@ -467,7 +467,6 @@ function test5()
     f:set_joinable(true)
     return f, f:status()
 end;
-local status;
 f, status = test5();
 status;
 f:status();
@@ -482,7 +481,10 @@ function test6()
 end;
 f, status = test6();
 status;
-f:status();
+test_run:wait_cond(function()
+    status = f:status()
+    return status == 'dead', status
+end, 10);
 
 -- test side fiber in transaction
 s = box.schema.space.create("test");
-- 
2.19.2

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-12-03  8:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-02 17:05 [PATCH] test: fix app/fiber.test.lua flaky fails Alexander Turenko
2018-12-03  8:42 ` Vladimir Davydov

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