Tarantool development patches archive
 help / color / mirror / Atom feed
* [tarantool-patches] [PATCH] test: use pretest_clean on sql-tap test suite
@ 2019-04-03  1:58 Alexander Turenko
  2019-04-03  2:06 ` [tarantool-patches] " Alexander Turenko
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Turenko @ 2019-04-03  1:58 UTC (permalink / raw)
  To: tarantool-patches; +Cc: Alexander Turenko, Nikita Pettik

A problem appears when tests are run in the following order on one
test-run worker:

- sql-tap/select6.test.lua
- sql-tap/gh-4077-iproto-execute-no-bind.test.lua

The latter one fails with the following error:

> Space 'T' already exists

This test does not perform require('sqltester'), where *.{xlog,snap}
files from a previous test are removed, and so the test can observe a
non-clean state of a database.

Now test-run has pretest_clean option that do exactly what sqltester had
been doing: when the option enabled test-run removes *.{xlog,snap} files
before run a 'core = app' test. The only difference that now these files
will be removed for every test in sql-tap test suite, not only for ones
that use sqltester.

Follows up #4077.
---

https://github.com/tarantool/tarantool/issues/4077
https://github.com/tarantool/tarantool/tree/Totktonada/use-pretest-clean-on-sql-tap-test-suite

 test/sql-tap/lua/sqltester.lua | 6 ------
 test/sql-tap/suite.ini         | 1 +
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/test/sql-tap/lua/sqltester.lua b/test/sql-tap/lua/sqltester.lua
index 4450f5a0a..87ddca718 100644
--- a/test/sql-tap/lua/sqltester.lua
+++ b/test/sql-tap/lua/sqltester.lua
@@ -426,12 +426,6 @@ end
 
 setmetatable(_G, nil)
 
--- perform clean up only under test-run
-if test_run then
-    os.execute("rm -rf $(ls -d */)")
-    os.execute("rm -f *.snap *.xlog* *.vylog* *.run*")
-end
-
 -- start the database
 box.cfg{
     memtx_max_tuple_size=4996109;
diff --git a/test/sql-tap/suite.ini b/test/sql-tap/suite.ini
index e3e483851..3b1dcce6a 100644
--- a/test/sql-tap/suite.ini
+++ b/test/sql-tap/suite.ini
@@ -28,3 +28,4 @@ release_disabled = debug_mode_only.test.lua
 long_run = gh-3332-tuple-format-leak.test.lua, gh-3083-ephemeral-unref-tuples.test.lua
 config = engine.cfg
 show_reproduce_content = False
+pretest_clean = True
-- 
2.20.1

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

end of thread, other threads:[~2019-04-03  2:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-03  1:58 [tarantool-patches] [PATCH] test: use pretest_clean on sql-tap test suite Alexander Turenko
2019-04-03  2:06 ` [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