From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Alexander Turenko Subject: [PATCH] test: fix app/fiber.test.lua flaky fails Date: Sun, 2 Dec 2018 20:05:07 +0300 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: Vladimir Davydov Cc: Alexander Turenko , tarantool-patches@freelists.org List-ID: 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