[tarantool-patches] Re: [PATCH 3/4] Tests: separate bootstrap routine to a lua_libs

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Mon Jul 23 16:36:27 MSK 2018


Thank you for working on the patch!

1. Please, do not start commit title with capital letter,
when it is related to a subsystem. Here you should write

     test: separate bootstrap ...

On 23/07/2018 14:14, AKhatskevich wrote:
> What is moved to `test/lul_libs/bootstrap_test_storage.lua`:

2. 'lul' libs?

> 1. create schema
> 2. create main stored procedures
> 3. `wait_rebalancer_state` procedure
> 
> This code would be reused it further commits.
> ---
>   test/lua_libs/bootstrap_test_storage.lua           | 50 ++++++++++++++++++++++
>   test/rebalancer/box_1_a.lua                        | 47 ++------------------
>   test/rebalancer/errinj.result                      |  2 +-
>   test/rebalancer/errinj.test.lua                    |  2 +-
>   test/rebalancer/rebalancer.result                  |  2 +-
>   test/rebalancer/rebalancer.test.lua                |  2 +-
>   test/rebalancer/rebalancer_lock_and_pin.result     |  2 +-
>   test/rebalancer/rebalancer_lock_and_pin.test.lua   |  2 +-
>   test/rebalancer/restart_during_rebalancing.result  |  2 +-
>   .../rebalancer/restart_during_rebalancing.test.lua |  2 +-
>   test/rebalancer/stress_add_remove_rs.result        |  2 +-
>   test/rebalancer/stress_add_remove_rs.test.lua      |  2 +-
>   .../rebalancer/stress_add_remove_several_rs.result |  2 +-
>   .../stress_add_remove_several_rs.test.lua          |  2 +-
>   test/rebalancer/suite.ini                          |  2 +-
>   15 files changed, 66 insertions(+), 57 deletions(-)
>   create mode 100644 test/lua_libs/bootstrap_test_storage.lua
> 
> diff --git a/test/lua_libs/bootstrap_test_storage.lua b/test/lua_libs/bootstrap_test_storage.lua
> new file mode 100644
> index 0000000..62c2f78
> --- /dev/null
> +++ b/test/lua_libs/bootstrap_test_storage.lua

3. Please, just merge it into util. It is actually just util.

> diff --git a/test/rebalancer/errinj.result b/test/rebalancer/errinj.result
> index d09349e..826c2c6 100644
> --- a/test/rebalancer/errinj.result
> +++ b/test/rebalancer/errinj.result
> @@ -13,7 +13,7 @@ test_run:create_cluster(REPLICASET_1, 'rebalancer')
>   test_run:create_cluster(REPLICASET_2, 'rebalancer')
>   ---
>   ...
> -util = require('util')
> +util = require('lua_libs.util')

4. Please, don't. This should disappear when you merge the utils
into util.lua.

>   ---
>   ...
>   util.wait_master(test_run, REPLICASET_1, 'box_1_a')




More information about the Tarantool-patches mailing list