<HTML><BODY><div class="js-helper js-readmsg-msg">
        <style type="text/css"></style>
        <div>
                <base target="_self" href="https://e.mail.ru/">
                
            <div id="style_15511919250000000042_BODY"><div class="class_1551211595">test: pre_cleanup routine switched on<br><br>Corrected and switched on the pre_cleanup routine,<br>which cleanups the schemas and functions between<br>running tests. All failed tests changed to be able to<br>run with the routine. At the box and engine_long suites<br>the common global functions moved to the modules<br>to avoid of its cleanup between tests.<br><br>Partly fix #3863<br><br>---<br><br>Travis-ci: <a href="https://travis-ci.org/tarantool/tarantool/builds/498752667" target="_blank" rel=" noopener noreferrer">https://travis-ci.org/tarantool/tarantool/builds/498752667</a> <br>Branch: <a href="https://github.com/tarantool/tarantool/tree/avtikhon/gh-3863-run-cleaner" target="_blank" rel=" noopener noreferrer">https://github.com/tarantool/tarantool/tree/avtikhon/gh-3863-run-cleaner</a> <br><br>diff --git a/test-run b/test-run<br>index 02207efd2..7552a0e6a 160000<br>--- a/test-run<br>+++ b/test-run<br>@@ -1 +1 @@<br>-Subproject commit 02207efd2ca44067b76c79bf012f142016d929ae<br>+Subproject commit 7552a0e6a36f24d6961c16dd4e6e44c53e410567<br>diff --git a/test/box/admin.result b/test/box/admin.result<br>index e6fc1f302..2e93f386b 100644<br>--- a/test/box/admin.result<br>+++ b/test/box/admin.result<br>@@ -24,7 +24,10 @@ help()<br>       \help show this screen<br>       \quit quit interactive console<br> ...<br>-cfg_filter(box.cfg)<br>+box_cfg_module = require('cfg_filter')<br>+---<br>+...<br>+box_cfg_module.cfg_filter(box.cfg)<br> ---<br> - - - background<br>     - false<br>diff --git a/test/box/admin.test.lua b/test/box/admin.test.lua<br>index 4e7a78f5b..bf587ccfc 100644<br>--- a/test/box/admin.test.lua<br>+++ b/test/box/admin.test.lua<br>@@ -6,7 +6,8 @@ space = box.schema.space.create('tweedledum')<br> index = space:create_index('primary')<br> <br> help()<br>-cfg_filter(box.cfg)<br>+box_cfg_module = require('cfg_filter')<br>+box_cfg_module.cfg_filter(box.cfg)<br> space:insert{1, 'tuple'}<br> box.snapshot()<br> space:delete{1}<br>diff --git a/test/box/box.lua b/test/box/box.lua<br>index b3b10ffd4..0fc93eaf0 100644<br>--- a/test/box/box.lua<br>+++ b/test/box/box.lua<br>@@ -9,26 +9,6 @@ box.cfg{<br> <br> require('console').listen(os.getenv('ADMIN'))<br> <br>-local _hide = {<br>-    pid_file=1, log=1, listen=1, vinyl_dir=1,<br>-    memtx_dir=1, wal_dir=1,<br>-    memtx_max_tuple_size=1, memtx_min_tuple_size=1<br>-}<br>-<br>-function cfg_filter(data)<br>-    if type(data)~='table' then return data end<br>-    local keys,k,_ = {}<br>-    for k in pairs(data) do<br>-        table.insert(keys, k)<br>-    end<br>-    table.sort(keys)<br>-    local result = {}<br>-    for _,k in pairs(keys) do<br>-        table.insert(result, {k, _hide[k] and '<hidden>' or cfg_filter(data[k])})<br>-    end<br>-    return result<br>-end<br>-<br> function compare(a,b)<br>     return a[1] < b[1]<br> end<br>diff --git a/test/box/cfg.result b/test/box/cfg.result<br>index 7778f82ac..f0e755436 100644<br>--- a/test/box/cfg.result<br>+++ b/test/box/cfg.result<br>@@ -1,3 +1,6 @@<br>+box_cfg_module = require('cfg_filter')<br>+---<br>+...<br> env = require('test_run')<br> ---<br> ...<br>@@ -12,7 +15,7 @@ box.cfg.nosuchoption = 1<br> ---<br> - error: 'builtin/box/load_cfg.lua:<line>: Attempt to modify a read-only table'<br> ...<br>-cfg_filter(box.cfg)<br>+box_cfg_module.cfg_filter(box.cfg)<br> ---<br> - - - background<br>     - false<br>@@ -111,7 +114,7 @@ cfg_filter(box.cfg)<br> box.cfg()<br> ---<br> ...<br>-cfg_filter(box.cfg)<br>+box_cfg_module.cfg_filter(box.cfg)<br> ---<br> - - - background<br>     - false<br>diff --git a/test/box/cfg.test.lua b/test/box/cfg.test.lua<br>index a6416241f..dcacb4d65 100644<br>--- a/test/box/cfg.test.lua<br>+++ b/test/box/cfg.test.lua<br>@@ -1,11 +1,13 @@<br>+box_cfg_module = require('cfg_filter')<br>+<br> env = require('test_run')<br> test_run = env.new()<br> test_run:cmd("push filter '(error: .*)\\.lua:[0-9]+: ' to '\\1.lua:<line>: '")<br> box.cfg.nosuchoption = 1<br>-cfg_filter(box.cfg)<br>+box_cfg_module.cfg_filter(box.cfg)<br> -- must be read-only<br> box.cfg()<br>-cfg_filter(box.cfg)<br>+box_cfg_module.cfg_filter(box.cfg)<br> <br> -- check that cfg with unexpected parameter fails.<br> box.cfg{sherlock = 'holmes'}<br>diff --git a/test/box/lua/cfg_filter.lua b/test/box/lua/cfg_filter.lua<br>new file mode 100644<br>index 000000000..31b077c37<br>--- /dev/null<br>+++ b/test/box/lua/cfg_filter.lua<br>@@ -0,0 +1,23 @@<br>+local box_cfg_module = {}<br>+<br>+local _hide = {<br>+    pid_file=1, log=1, listen=1, vinyl_dir=1,<br>+    memtx_dir=1, wal_dir=1,<br>+    memtx_max_tuple_size=1, memtx_min_tuple_size=1<br>+}<br>+<br>+function box_cfg_module.cfg_filter(data)<br>+    if type(data)~='table' then return data end<br>+    local keys,k,_ = {}<br>+    for k in pairs(data) do<br>+        table.insert(keys, k)<br>+    end<br>+    table.sort(keys)<br>+    local result = {}<br>+    for _,k in pairs(keys) do<br>+        table.insert(result, {k, _hide[k] and '<hidden>' or box_cfg_module.cfg_filter(data[k])})<br>+    end<br>+    return result<br>+end<br>+<br>+return box_cfg_module<br>diff --git a/test/box/suite.ini b/test/box/suite.ini<br>index fee1c40b4..346536c1c 100644<br>--- a/test/box/suite.ini<br>+++ b/test/box/suite.ini<br>@@ -4,6 +4,6 @@ description = Database tests<br> script = box.lua<br> disabled = rtree_errinj.test.lua tuple_bench.test.lua<br> release_disabled = errinj.test.lua errinj_index.test.lua rtree_errinj.test.lua upsert_errinj.test.lua iproto_stress.test.lua<br>-lua_libs = lua/fifo.lua lua/utils.lua lua/bitset.lua lua/index_random_test.lua lua/push.lua lua/identifier.lua<br>+lua_libs = lua/cfg_filter.lua lua/fifo.lua lua/utils.lua lua/bitset.lua lua/index_random_test.lua lua/push.lua lua/identifier.lua<br> use_unix_sockets = True<br> is_parallel = True<br>diff --git a/test/engine_long/delete_insert.test.lua b/test/engine_long/delete_insert.test.lua<br>index 275aaa23e..83119cf14 100644<br>--- a/test/engine_long/delete_insert.test.lua<br>+++ b/test/engine_long/delete_insert.test.lua<br>@@ -1,6 +1,9 @@<br>+el_mod = require("suite")<br>+<br> test_run = require('test_run')<br> inspector = test_run.new()<br> engine = inspector:get_cfg('engine')<br> iterations = 100000<br>+<br> math.randomseed(1)<br>-delete_insert(engine, iterations)<br>+el_mod.delete_insert(engine, iterations)<br>diff --git a/test/engine_long/delete_replace_update.test.lua b/test/engine_long/delete_replace_update.test.lua<br>index 466b8f007..004597b15 100644<br>--- a/test/engine_long/delete_replace_update.test.lua<br>+++ b/test/engine_long/delete_replace_update.test.lua<br>@@ -1,17 +1,19 @@<br>+el_mod = require("suite")<br>+<br> engine_name = 'memtx'<br> iterations = 100000<br> <br> math.randomseed(1)<br>-delete_replace_update(engine_name, iterations)<br>+el_mod.delete_replace_update(engine_name, iterations)<br> <br> math.randomseed(2)<br>-delete_replace_update(engine_name, iterations)<br>+el_mod.delete_replace_update(engine_name, iterations)<br> <br> math.randomseed(3)<br>-delete_replace_update(engine_name, iterations)<br>+el_mod.delete_replace_update(engine_name, iterations)<br> <br> math.randomseed(4)<br>-delete_replace_update(engine_name, iterations)<br>+el_mod.delete_replace_update(engine_name, iterations)<br> <br> math.randomseed(5)<br>-delete_replace_update(engine_name, iterations)<br>+el_mod.delete_replace_update(engine_name, iterations)<br>diff --git a/test/engine_long/suite.lua b/test/engine_long/suite.lua<br>index 464138db1..4db885031 100644<br>--- a/test/engine_long/suite.lua<br>+++ b/test/engine_long/suite.lua<br>@@ -1,3 +1,4 @@<br>+local engine_long_module = {}<br> <br> function string_function()<br>     local random_number<br>@@ -10,7 +11,7 @@ function string_function()<br>     return random_string<br> end<br> <br>-function delete_replace_update(engine_name, iterations)<br>+function engine_long_module.delete_replace_update(engine_name, iterations)<br>     local string_value<br>     if (box.space._space.index.name:select{'tester'}[1] ~= nil) then<br>         box.space.tester:drop()<br>@@ -69,7 +70,7 @@ function delete_replace_update(engine_name, iterations)<br>     return {counter, random_number, string_value_2, string_value_3}<br> end<br> <br>-function delete_insert(engine_name, iterations)<br>+function engine_long_module.delete_insert(engine_name, iterations)<br>     local string_value<br>     if (box.space._space.index.name:select{'tester'}[1] ~= nil) then<br>         box.space.tester:drop()<br>@@ -107,3 +108,5 @@ function delete_insert(engine_name, iterations)<br>     box.space.tester:drop()<br>     return {counter, string_value_2}<br> end<br>+<br>+return engine_long_module<br><br><br><br>-- <br>Alexander Tikhonov
</div></div>
            
        
                <base target="_self" href="https://e.mail.ru/">
        </div>

        
</div></BODY></HTML>