Tarantool development patches archive
 help / color / mirror / Atom feed
From: "Alexander Tikhonov" <avtikhon@tarantool.org>
To: tarantool-patches <tarantool-patches@freelists.org>,
	"Alexander Turenko" <alexander.turenko@tarantool.org>
Subject: [tarantool-patches] test-run: pre_cleanup function corrected and enabled
Date: Wed, 27 Feb 2019 07:53:18 +0300	[thread overview]
Message-ID: <1551243198.626093438@f481.i.mail.ru> (raw)

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

Corrected and switched on the pre_cleanup routine,
which cleanups the schemas and functions between
running tests.

Partly fix #3863

---

Travis-ci:  https://travis-ci.org/tarantool/tarantool/builds/498779830
Branch:  https://github.com/tarantool/tarantool/tree/avtikhon/gh-3863-run-cleaner

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

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

             reply	other threads:[~2019-02-27  4:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-27  4:53 Alexander Tikhonov [this message]
2019-02-27 13:25 ` [tarantool-patches] " Alexander Turenko

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=1551243198.626093438@f481.i.mail.ru \
    --to=avtikhon@tarantool.org \
    --cc=alexander.turenko@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [tarantool-patches] test-run: pre_cleanup function corrected and enabled' \
    /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