From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 006EB242C5 for ; Mon, 23 Jul 2018 09:36:31 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fQKcGPkTVfJU for ; Mon, 23 Jul 2018 09:36:30 -0400 (EDT) Received: from smtp51.i.mail.ru (smtp51.i.mail.ru [94.100.177.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id ACEF2214A3 for ; Mon, 23 Jul 2018 09:36:30 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH 3/4] Tests: separate bootstrap routine to a lua_libs References: <93c39ca3ca0a450afaf1e0aaf865933f1b99ffad.1532344376.git.avkhatskevich@tarantool.org> From: Vladislav Shpilevoy Message-ID: Date: Mon, 23 Jul 2018 16:36:27 +0300 MIME-Version: 1.0 In-Reply-To: <93c39ca3ca0a450afaf1e0aaf865933f1b99ffad.1532344376.git.avkhatskevich@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org, AKhatskevich 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')