From: Alexander Turenko <alexander.turenko@tarantool.org>
To: tarantool-patches@freelists.org
Cc: Alexander Turenko <alexander.turenko@tarantool.org>,
Nikita Pettik <korablev@tarantool.org>
Subject: [tarantool-patches] [PATCH] test: use pretest_clean on sql-tap test suite
Date: Wed, 3 Apr 2019 04:58:10 +0300 [thread overview]
Message-ID: <96cdc5ba8fcb20fcbe51c850c4c541d855594d7d.1554251743.git.alexander.turenko@tarantool.org> (raw)
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
next reply other threads:[~2019-04-03 1:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-03 1:58 Alexander Turenko [this message]
2019-04-03 2:06 ` [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=96cdc5ba8fcb20fcbe51c850c4c541d855594d7d.1554251743.git.alexander.turenko@tarantool.org \
--to=alexander.turenko@tarantool.org \
--cc=korablev@tarantool.org \
--cc=tarantool-patches@freelists.org \
--subject='Re: [tarantool-patches] [PATCH] test: use pretest_clean on sql-tap test suite' \
/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