Tarantool development patches archive
 help / color / mirror / Atom feed
From: "Alexander V. Tikhonov" <avtikhon@tarantool.org>
To: Kirill Yukhin <kyukhin@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: [Tarantool-patches] [PATCH v1 4/4] test: fix hanging of vinyl/gh.test.lua
Date: Fri, 30 Oct 2020 10:00:02 +0300	[thread overview]
Message-ID: <6c7cafac5a26940009ef97df3b913daa7dba97c1.1604040010.git.avtikhon@tarantool.org> (raw)
In-Reply-To: <cover.1604040010.git.avtikhon@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

  parent reply	other threads:[~2020-10-30  7:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-30  6:59 [Tarantool-patches] [PATCH v1 0/4] test: stabilize testing with issue #5141 Alexander V. Tikhonov
2020-10-30  6:59 ` [Tarantool-patches] [PATCH v1 1/4] test: add test filter for box.snapshot Alexander V. Tikhonov
2020-10-30  7:00 ` [Tarantool-patches] [PATCH v1 2/4] test: create reproducer for #5141 Alexander V. Tikhonov
2020-10-30  7:00 ` [Tarantool-patches] [PATCH v1 3/4] test: fix flaky vinyl/gh-4957-too-many-upserts Alexander V. Tikhonov
2020-10-30  7:00 ` Alexander V. Tikhonov [this message]
2020-11-01  8:53 ` [Tarantool-patches] [PATCH v1 0/4] test: stabilize testing with issue #5141 Kirill Yukhin
2020-11-01 21:57 ` Nikita Pettik
2020-11-02  7:33   ` Alexander V. Tikhonov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6c7cafac5a26940009ef97df3b913daa7dba97c1.1604040010.git.avtikhon@tarantool.org \
    --to=avtikhon@tarantool.org \
    --cc=kyukhin@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v1 4/4] test: fix hanging of vinyl/gh.test.lua' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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