From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp39.i.mail.ru (smtp39.i.mail.ru [94.100.177.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 2691A44643E for ; Fri, 30 Oct 2020 10:00:09 +0300 (MSK) From: "Alexander V. Tikhonov" Date: Fri, 30 Oct 2020 10:00:02 +0300 Message-Id: <6c7cafac5a26940009ef97df3b913daa7dba97c1.1604040010.git.avtikhon@tarantool.org> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH v1 4/4] test: fix hanging of vinyl/gh.test.lua List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kirill Yukhin Cc: tarantool-patches@dev.tarantool.org Found that the previously fixed vinyl/gh.test.lua test in commit: 94dc5bddc1fb0f9e6ebebfc5aa6be586e5b6759e ('test: gh test hangs after gh-4957-too-many-upserts') with adding fiber.sleep(1) workaround to avoid of raise from the previously run vinyl/gh-4957-too-many-upserts.test.lua test can be changed in the other way. The new change from one side will leave the found issue untouched to be able to resolve it within opened issue in github. And from the other side it will let the test-run tool to be able to avoid of this issue using fragile list feature to save the stability of testing due to found issue is flaky and can be passed on reruns. The current fix changes the forever waiting loop to especially created for such situations test_run:wait_cond() routine which has timeout in it to avoid of hanging the test till global timeout will occure. It will let the testing to be continued even after the fail. Needed for #5141 --- test/vinyl/gh.result | 6 ++---- test/vinyl/gh.test.lua | 4 +--- test/vinyl/suite.ini | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/test/vinyl/gh.result b/test/vinyl/gh.result index 0fd74af83..a0d3405de 100644 --- a/test/vinyl/gh.result +++ b/test/vinyl/gh.result @@ -7,9 +7,6 @@ env = require('test_run') test_run = env.new() --- ... -fiber.sleep(1) ---- -... -- gh-283: hang after three creates and drops s = box.schema.space.create('space0', {engine='vinyl'}) --- @@ -716,8 +713,9 @@ test_run:cmd("setopt delimiter ''"); cont = false --- ... -while finished ~= 2 do fiber.sleep(0.01) end +test_run:wait_cond(function() return finished ~= 2 end) --- +- true ... s:drop() --- diff --git a/test/vinyl/gh.test.lua b/test/vinyl/gh.test.lua index c72444f5f..b6b9e8b07 100644 --- a/test/vinyl/gh.test.lua +++ b/test/vinyl/gh.test.lua @@ -2,8 +2,6 @@ fiber = require('fiber') env = require('test_run') test_run = env.new() -fiber.sleep(1) - -- gh-283: hang after three creates and drops s = box.schema.space.create('space0', {engine='vinyl'}) i = s:create_index('space0', {type = 'tree', parts = {1, 'string'}}) @@ -311,7 +309,7 @@ end; test_run:cmd("setopt delimiter ''"); cont = false -while finished ~= 2 do fiber.sleep(0.01) end +test_run:wait_cond(function() return finished ~= 2 end) s:drop() diff --git a/test/vinyl/suite.ini b/test/vinyl/suite.ini index 2d69878af..0f7b21793 100644 --- a/test/vinyl/suite.ini +++ b/test/vinyl/suite.ini @@ -53,7 +53,7 @@ fragile = { }, "gh.test.lua": { "issues": [ "gh-5141" ], - "checksums": [ "f1286e9e4710062ddfbffb61b2fe2743", "96b22440ab8a881d6b8d14c5ee1672fb" ] + "checksums": [ "f1286e9e4710062ddfbffb61b2fe2743", "96b22440ab8a881d6b8d14c5ee1672fb", "fc77a97c3c891c57d4717087f7a65bd0" ] }, "gh-5141-invalid-vylog-file.test.lua": { "issues": [ "gh-5141" ], -- 2.25.1