Tarantool development patches archive
 help / color / mirror / Atom feed
From: "Alexander Tikhonov" <avtikhon@tarantool.org>
To: "Nikita Pettik" <korablev@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v1 1/1] lua: fix test sql/func-recreate.test.lua
Date: Thu, 16 Apr 2020 22:33:00 +0300	[thread overview]
Message-ID: <1587065580.758783904@f496.i.mail.ru> (raw)
In-Reply-To: <20200416191851.GA8455@tarantool.org>

[-- Attachment #1: Type: text/plain, Size: 4639 bytes --]




  
>Четверг, 16 апреля 2020, 22:18 +03:00 от Nikita Pettik <korablev@tarantool.org>:
> 
>On 16 Apr 22:09, Alexander Tikhonov wrote:
>>
>> Hi Mergen, thanks for the patch, I’ve checked it on 2.2 and it runs fine, patch LGTM.
>>
>
>Did you verify that modified test still reproduces initial problem?
>I hope so, but ask just in case.
Sure, I’ve checked this test before the fix and reproduced the needed issue just before the fix. With the current fix flaky fail resolved and checking error in the test became stable.
>  
>> >Четверг, 16 апреля 2020, 22:07 +03:00 от imeevma@tarantool.org:
>> > 
>> >Closes #4384
>> >---
>> > https://github.com/tarantool/tarantool/issues/4384
>> > https://github.com/tarantool/tarantool/tree/imeevma/gh-4384-fix-test-func-recreate
>> >
>> >@ChangeLog
>> > - Fixed flaky test sql/func-recreate.test.lua (gh-4384).
>> >
>> > test/sql/func-recreate.result | 19 +++++++++++--------
>> > test/sql/func-recreate.test.lua | 11 ++++++-----
>> > test/sql/suite.ini | 1 -
>> > 3 files changed, 17 insertions(+), 14 deletions(-)
>> >
>> >diff --git a/test/sql/func-recreate.result b/test/sql/func-recreate.result
>> >index 73fb03c..470ce5a 100644
>> >--- a/test/sql/func-recreate.result
>> >+++ b/test/sql/func-recreate.result
>> >@@ -12,31 +12,34 @@ box.execute('pragma sql_default_engine=\''..engine..'\'')
>> > fiber = require('fiber')
>> > ---
>> > ...
>> >-box.internal.sql_create_function('WAITFOR', 'INT', function (n) fiber.sleep(n) return n end)
>> >+flag = true
>> > ---
>> > ...
>> >-ch = fiber.channel(1)
>> >+box.internal.sql_create_function('WAITFOR', 'INT', function () while flag do fiber.sleep(0.01) end return 0 end)
>> > ---
>> > ...
>> >-_ = fiber.create(function () ch:put(box.execute('select WAITFOR(0.2)')) end)
>> >+ch = fiber.channel(1)
>> > ---
>> > ...
>> >-fiber.sleep(0.1)
>> >+_ = fiber.create(function () ch:put(box.execute('select WAITFOR()')) end)
>> > ---
>> > ...
>> >-box.internal.sql_create_function('WAITFOR', 'INT', function (n) require('fiber').sleep(n) return n end)
>> >+box.internal.sql_create_function('WAITFOR', 'INT', function () while flag do fiber.sleep(0.01) end return 0 end)
>> > ---
>> > - error: 'Failed to create function ''WAITFOR'': unable to create function due to
>> >     active statements'
>> > ...
>> >+flag = false
>> >+---
>> >+...
>> > ch:get()
>> > ---
>> > - metadata:
>> >- - name: WAITFOR(0.2)
>> >+ - name: WAITFOR()
>> >     type: integer
>> >   rows:
>> >- - [0.2]
>> >+ - [0]
>> > ...
>> >-box.internal.sql_create_function('WAITFOR', 'INT', function (n) require('fiber').sleep(n) return n end)
>> >+box.internal.sql_create_function('WAITFOR', 'INT', function () while flag do fiber.sleep(0.01) end return 0 end)
>> > ---
>> > ...
>> >diff --git a/test/sql/func-recreate.test.lua b/test/sql/func-recreate.test.lua
>> >index 753e9ca..d482fa9 100644
>> >--- a/test/sql/func-recreate.test.lua
>> >+++ b/test/sql/func-recreate.test.lua
>> >@@ -4,14 +4,15 @@ box.execute('pragma sql_default_engine=\''..engine..'\'')
>> > 
>> > -- Check errors during function create process
>> > fiber = require('fiber')
>> >-box.internal.sql_create_function('WAITFOR', 'INT', function (n) fiber.sleep(n) return n end)
>> >+flag = true
>> >+box.internal.sql_create_function('WAITFOR', 'INT', function () while flag do fiber.sleep(0.01) end return 0 end)
>> > 
>> > ch = fiber.channel(1)
>> > 
>> >-_ = fiber.create(function () ch:put(box.execute('select WAITFOR(0.2)')) end)
>> >-fiber.sleep(0.1)
>> >+_ = fiber.create(function () ch:put(box.execute('select WAITFOR()')) end)
>> > 
>> >-box.internal.sql_create_function('WAITFOR', 'INT', function (n) require('fiber').sleep(n) return n end)
>> >+box.internal.sql_create_function('WAITFOR', 'INT', function () while flag do fiber.sleep(0.01) end return 0 end)
>> >+flag = false
>> > ch:get()
>> >-box.internal.sql_create_function('WAITFOR', 'INT', function (n) require('fiber').sleep(n) return n end)
>> >+box.internal.sql_create_function('WAITFOR', 'INT', function () while flag do fiber.sleep(0.01) end return 0 end)
>> > 
>> >diff --git a/test/sql/suite.ini b/test/sql/suite.ini
>> >index a8664c5..cc1d641 100644
>> >--- a/test/sql/suite.ini
>> >+++ b/test/sql/suite.ini
>> >@@ -11,4 +11,3 @@ release_disabled = errinj.test.lua view_delayed_wal.test.lua sql-debug.test.lua
>> > disabled = sql-statN-index-drop.test.lua
>> > pretest_clean = True
>> > fragile = dll.test.lua ; gh-4427
>> >- func-recreate.test.lua ; gh-4384
>> >--
>> >2.7.4
>> > 
>>  
>>  
>> --
>> Alexander Tikhonov
>>   
 
 
--
Alexander Tikhonov
 

[-- Attachment #2: Type: text/html, Size: 6528 bytes --]

  reply	other threads:[~2020-04-16 19:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-16 19:07 imeevma
2020-04-16 19:09 ` Alexander Tikhonov
2020-04-16 19:18   ` Nikita Pettik
2020-04-16 19:33     ` Alexander Tikhonov [this message]
2020-04-16 20:24     ` Mergen Imeev
2020-04-16 21:02       ` Nikita Pettik
2020-04-16 21:15         ` Mergen Imeev
2020-04-16 22:04           ` Nikita Pettik
2020-04-17  6:05             ` Alexander Tikhonov
2020-04-17 12:45               ` Nikita Pettik
2020-04-17 14:18                 ` Mergen Imeev
2020-04-17 15:50                   ` Nikita Pettik
2020-04-17  6:25             ` Mergen Imeev
2020-04-17  6:31               ` Alexander 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=1587065580.758783904@f496.i.mail.ru \
    --to=avtikhon@tarantool.org \
    --cc=korablev@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v1 1/1] lua: fix test sql/func-recreate.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