[tarantool-patches] Re: [PATCH] test: use pretest_clean on sql-tap test suite

Alexander Turenko alexander.turenko at tarantool.org
Wed Apr 3 05:06:29 MSK 2019


Pushed to master and 2.1.

WBR, Alexander Turenko.

On Wed, Apr 03, 2019 at 04:58:10AM +0300, Alexander Turenko wrote:
> 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
> 




More information about the Tarantool-patches mailing list