From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 6DAE626A05 for ; Wed, 27 Feb 2019 08:25:10 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8QVbHM6OoODP for ; Wed, 27 Feb 2019 08:25:10 -0500 (EST) Received: from smtp16.mail.ru (smtp16.mail.ru [94.100.176.153]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 4B5AB22317 for ; Wed, 27 Feb 2019 08:25:09 -0500 (EST) Date: Wed, 27 Feb 2019 16:25:09 +0300 From: Alexander Turenko Subject: [tarantool-patches] Re: test-run: pre_cleanup function corrected and enabled Message-ID: <20190227132509.z2ws47dz6vxrzc2s@tkn_work_nb> References: <1551243198.626093438@f481.i.mail.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1551243198.626093438@f481.i.mail.ru> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: Alexander Tikhonov Cc: tarantool-patches 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