Tarantool development patches archive
 help / color / mirror / Atom feed
* [tarantool-patches] test-run: pre_cleanup function corrected and enabled
@ 2019-02-27  4:53 Alexander Tikhonov
  2019-02-27 13:25 ` [tarantool-patches] " Alexander Turenko
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Tikhonov @ 2019-02-27  4:53 UTC (permalink / raw)
  To: tarantool-patches, Alexander Turenko

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-02-27 13:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-27  4:53 [tarantool-patches] test-run: pre_cleanup function corrected and enabled Alexander Tikhonov
2019-02-27 13:25 ` [tarantool-patches] " Alexander Turenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox