Tarantool development patches archive
 help / color / mirror / Atom feed
From: Alexander Turenko <alexander.turenko@tarantool.org>
To: avtikhon <avtikhon@tarantool.org>
Cc: tarantool-patches@freelists.org
Subject: [tarantool-patches] Re: [PATCH v1] test: switch on pretest_clean routine
Date: Sun, 7 Apr 2019 10:08:24 +0300	[thread overview]
Message-ID: <20190407070823.jhtdeoltpe7qeqwj@tkn_work_nb> (raw)
In-Reply-To: <bc7efb987065205f008439bf196c0a89eba5ed37.1554357935.git.avtikhon@tarantool.org>

Removed the flag from python tests and unit tests (it does not do
anything in these cases, see the description in test-run/README.md).

There was review [1] and it seems some comments are still actual.
However I tried to implement that myself and was dissatisfied with the
result, because of the following reasons:

- much code of tests moves around w/o visible reasons;
- this way disallows usage of functions from an instance file in tests
  w/o, again, visible reasons; it obligates a developer to have a
  separate file for helper functions to reuse them across tests or copy
  them to each test (and they will reside in result files also).

So I decided to implement user-provided list of protected globals [2]
and use it here.

Described how the option works in the commit message and mentioned that
the issue has an example of a problem that is beat with this option.

Pushed to master and 2.1.

[1]: https://www.freelists.org/post/tarantool-patches/test-switched-on-pretest-clean-routine,1
[2]: https://github.com/tarantool/test-run/pull/153

WBR, Alexander Turenko.

On Thu, Apr 04, 2019 at 09:11:01AM +0300, avtikhon wrote:
> Flag 'pretest_clean = True' at the suite.ini file switches on
> pretest_clean routine at the 'test-run' which helps to cleanup
> the test environment before test start. This 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. Also it removes the global functions in box suite
> before each test, that is why they were moved at the test_helpers
> module.
> ---
> 
> Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-3863-pretest-clean
> Issue: https://github.com/tarantool/tarantool/issues/4094

      reply	other threads:[~2019-04-07  7:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-04  6:11 [tarantool-patches] " avtikhon
2019-04-07  7:08 ` Alexander Turenko [this message]

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=20190407070823.jhtdeoltpe7qeqwj@tkn_work_nb \
    --to=alexander.turenko@tarantool.org \
    --cc=avtikhon@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH v1] test: switch on pretest_clean routine' \
    /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