From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> To: "Alexander V. Tikhonov" <avtikhon@tarantool.org>, Kirill Yukhin <kyukhin@tarantool.org> Cc: tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH v2] test: fix hanging of gh.test.lua Date: Mon, 19 Oct 2020 22:12:41 +0200 [thread overview] Message-ID: <e9f1289b-1fb0-1eba-8e8f-40e0110b30b2@tarantool.org> (raw) In-Reply-To: <aad6c1bfda24455f1fa720ad66aaf41aaf8c7653.1603094877.git.avtikhon@tarantool.org> Hi! Thanks for the patch! See 4 comments below. On 19.10.2020 10:08, Alexander V. Tikhonov wrote: > 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. > > Also added box_snapshot.test.lua() function to vinyl/gh.test.lua and > vinyl/iterator.test.lua tests to be able to avoid of printing changing > data in results file to be able to use its checksum in fragile list > of test-run to be able to rerun it as flaky issues. > Added checksum to fragile list: > > vinyl/gh.test.lua gh-5141 > vinyl/iterator.test.lua gh-5141 > > Follows up #5141 > --- > > Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-5141-gh_test > Issue: https://github.com/tarantool/tarantool/issues/5141 > > test/vinyl/gh.result | 28 ++++++++++++++++++---------- > test/vinyl/gh.test.lua | 19 +++++++++++++------ > test/vinyl/iterator.result | 26 ++++++++++++++++++-------- > test/vinyl/iterator.test.lua | 17 +++++++++++++---- 1. In the commit title you said you change gh.test.lua. Why do you also change iterator.test.lua? > test/vinyl/suite.ini | 6 +++--- > 5 files changed, 65 insertions(+), 31 deletions(-) > > diff --git a/test/vinyl/gh.result b/test/vinyl/gh.result > index 0fd74af83..9806f2079 100644 > --- a/test/vinyl/gh.result > +++ b/test/vinyl/gh.result > @@ -7,7 +7,14 @@ env = require('test_run') > test_run = env.new() > --- > ... > -fiber.sleep(1) > +function box_snapshot() \ > + local ok, err = pcall(box.snapshot) \ > + if (ok == false) then \ 2. In Lua you don't need parentheses in the 'if' condition. > + require('log').error( \ > + "box.snapshot() failed with error: " .. err) \ > + end \ > + return ok \ > +end; 3. ';' is not necessary either. > --- > ... > -- gh-283: hang after three creates and drops > diff --git a/test/vinyl/gh.test.lua b/test/vinyl/gh.test.lua > index c72444f5f..d2d024877 100644 > --- a/test/vinyl/gh.test.lua > +++ b/test/vinyl/gh.test.lua > @@ -311,7 +318,7 @@ end; > test_run:cmd("setopt delimiter ''"); > > cont = false > -while finished ~= 2 do fiber.sleep(0.01) end > +test_run:wait_cond(function() fiber.sleep(0.01) return finished ~= 2 end) 4. wait_cond() does fiber.sleep for you, no need to call it manually.
next prev parent reply other threads:[~2020-10-19 20:12 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <522704d93d2574694936e85c939b6e10135951d7.1603094877.git.avtikhon@tarantool.org> 2020-10-19 8:08 ` Alexander V. Tikhonov 2020-10-19 20:12 ` Vladislav Shpilevoy [this message] 2020-10-20 8:46 ` 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=e9f1289b-1fb0-1eba-8e8f-40e0110b30b2@tarantool.org \ --to=v.shpilevoy@tarantool.org \ --cc=avtikhon@tarantool.org \ --cc=kyukhin@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH v2] test: fix hanging of 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