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