From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f65.google.com (mail-lf1-f65.google.com [209.85.167.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 3E684469719 for ; Fri, 20 Mar 2020 12:20:48 +0300 (MSK) Received: by mail-lf1-f65.google.com with SMTP id v4so235644lfo.12 for ; Fri, 20 Mar 2020 02:20:48 -0700 (PDT) Date: Fri, 20 Mar 2020 12:20:45 +0300 From: Konstantin Osipov Message-ID: <20200320092044.GC13089@atlas> References: <20200319102458.GA73894@pony.bronevichok.ru> <20200319213159.GB14296@atlas> <20200320070921.GA11302@pony.bronevichok.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200320070921.GA11302@pony.bronevichok.ru> Subject: Re: [Tarantool-patches] [PATCH v2] Split box/hash.test.lua to a set of small independent tests List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sergey Bronnikov Cc: Oleg Piskunov , tarantool-patches@dev.tarantool.org * Sergey Bronnikov [20/03/20 10:10]: > On 00:31 Fri 20 Mar , Konstantin Osipov wrote: > > * Sergey Bronnikov [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