[Tarantool-patches] [PATCH v2 2/6] Fix luacheck warnings in test/

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Sat Apr 11 19:54:29 MSK 2020


Hi! Thanks for the patch!

> diff --git a/test/box/iproto_stress.result b/test/box/iproto_stress.result
> index 7149d6c52..3b5b0a031 100644
> --- a/test/box/iproto_stress.result
> +++ b/test/box/iproto_stress.result
> @@ -76,13 +76,13 @@ test_run:wait_cond(function() return n_workers == 0 end, 60)
>  ---
>  - true
>  ...
> -n_workers -- 0
> +assert(n_workers == 0)

These changes should not be done, IMO. Most of our
tests are diff based, and therefore it is ok to write
a statement just to print it. It is not only simpler, but
also allows to print the actual value, if it didn't match
the expected value.

For example, if n_workers becomes not 0, we would see its
actual value in the diff. When we use assert(), we won't
see anything except an error message 'assertion failed'.

I propose to allow writing non-functional statements in
test/ dir.


More information about the Tarantool-patches mailing list