[tarantool-patches] Re: test-run: pre_cleanup function corrected and enabled

Alexander Turenko alexander.turenko at tarantool.org
Wed Feb 27 16:25:09 MSK 2019


NB: Superseded by https://github.com/tarantool/test-run/pull/142

WBR, Alexander Turenko.

On Wed, Feb 27, 2019 at 07:53:18AM +0300, Alexander Tikhonov wrote:
>    Corrected and switched on the pre_cleanup routine,
>    which cleanups the schemas and functions between
>    running tests.
>    Partly fix #3863
>    ---
>    Travis-ci:
>    [1]https://travis-ci.org/tarantool/tarantool/builds/498779830
>    Branch:
>    [2]https://github.com/tarantool/tarantool/tree/avtikhon/gh-3863-run-cle
>    aner
>    diff --git a/lib/test_suite.py b/lib/test_suite.py
>    index 4c8a75b..721db3c 100644
>    --- a/lib/test_suite.py
>    +++ b/lib/test_suite.py
>    @@ -110,7 +110,7 @@ class TestSuite:
>                     dict.fromkeys(self.ini[i].split())
>                     if i in self.ini else dict())
> 
>    -        self.parse_bool_opt('pre_cleanup', False)
>    +        self.parse_bool_opt('pre_cleanup', True)
>             self.parse_bool_opt('use_unix_sockets', False)
>             self.parse_bool_opt('use_unix_sockets_iproto', False)
>             self.parse_bool_opt('is_parallel', False)
>    diff --git a/pre_cleanup.lua b/pre_cleanup.lua
>    index 7702c5a..96be316 100644
>    --- a/pre_cleanup.lua
>    +++ b/pre_cleanup.lua
>    @@ -12,6 +12,13 @@ local function cleanup(self)
>             box.space[name]:drop()
>         end)
> 
>    +    local cluster = box.space._cluster:select()
>    +    for _, tuple in pairs(cluster) do
>    +        if tuple[1] ~= box.info.id then
>    +            box.space._cluster:delete(tuple[1])
>    +        end
>    +    end
>    +
>         local _USER_TYPE = 4
>         local _USER_NAME = 3
> 
>    --
>    Alexander Tikhonov
> 
> References
> 
>    1. https://travis-ci.org/tarantool/tarantool/builds/498779830
>    2. https://github.com/tarantool/tarantool/tree/avtikhon/gh-3863-run-cleaner




More information about the Tarantool-patches mailing list