Tarantool development patches archive
 help / color / mirror / Atom feed
From: Konstantin Osipov <kostja.osipov@gmail.com>
To: Sergey Bronnikov <sergeyb@tarantool.org>
Cc: Oleg Piskunov <o.piskunov@tarantool.org>,
	tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v2] Split box/hash.test.lua to a set of small independent tests
Date: Fri, 20 Mar 2020 12:20:45 +0300	[thread overview]
Message-ID: <20200320092044.GC13089@atlas> (raw)
In-Reply-To: <20200320070921.GA11302@pony.bronevichok.ru>

* Sergey Bronnikov <sergeyb@tarantool.org> [20/03/20 10:10]:
> On 00:31 Fri 20 Mar , Konstantin Osipov wrote:
> > * Sergey Bronnikov <sergeyb@tarantool.org> [20/03/19 13:25]:
> > > Splitted single hash.test.lua to a set of small independent tests.
> >
> > No rationale?
> 
> No, there are.
> Right now the most tarantool tests looks like a huge unstructured pieces
> of code.

> There are no clear boundaries between testcases and it is
> unclear what we want to test exactly, sometimes comments understand
> these boundaries. Often setup/teardown mixed between testcases and
> testcases doesn't make cleanup at the end. It means that tests left
> 'dirty' environment and it may affect next testcases.
> 
> I want to follow pattern AAA (Act-Arrange-Assert) in tarantool tests in
> future and make tests more clear, maintainable and stable. Splitting
> huge tests for an independent testcase is a first step into this
> direction. Perhaps we can split testcases into separate functions, but
> AFAIK test-run.py cannot manage Lua functions as a separate testcases.

This rationale belongs to the commit comment. 

My take is - the rationale is weak. From the outside it looks like
you do not understand this code well enough but try to modify it
to match your expectations. Besides, it is puzzling why you spend
time on it, as if there were no areas in the code that required
testing (transactional data dictionary!). The tests were written by developers 
and serve their purpose quite well. If you feel you would like to
exercise AAA pattern, go ahead and write some new tests - and
make an effort that they are as fast, clean and easy to use as
existing ones. 

-- 
Konstantin Osipov, Moscow, Russia
https://scylladb.com

  reply	other threads:[~2020-03-20  9:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-19 10:24 Sergey Bronnikov
2020-03-19 11:09 ` Oleg Piskunov
2020-03-19 14:22 ` Alexander Tikhonov
2020-03-19 21:31 ` Konstantin Osipov
2020-03-20  7:09   ` Sergey Bronnikov
2020-03-20  9:20     ` Konstantin Osipov [this message]
2020-03-25  9:13 ` Kirill Yukhin

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=20200320092044.GC13089@atlas \
    --to=kostja.osipov@gmail.com \
    --cc=o.piskunov@tarantool.org \
    --cc=sergeyb@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v2] Split box/hash.test.lua to a set of small independent tests' \
    /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