[Tarantool-patches] [PATCH v2] Split box/hash.test.lua to a set of small independent tests

Sergey Bronnikov sergeyb at tarantool.org
Fri Mar 20 10:09:21 MSK 2020


On 00:31 Fri 20 Mar , Konstantin Osipov wrote:
> * Sergey Bronnikov <sergeyb at 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.

> --
> Konstantin Osipov, Moscow, Russia

--
sergeyb@


More information about the Tarantool-patches mailing list