Closed
Description
box.once(key, func)
call will be executed only first time if the same key
will be used in different tests or if a test with this call will be executed twice on the same worker.
Example that reproduces the problem on tarantool-2.4.0-82-gd8a9f1d9c (in fact on any actual tarantool version at the moment of writing):
$ (cd test && ./test-run.py --long -j 1 vinyl/stress.test.lua vinyl/stress.test.lua)
The log of the instance will show attempt to index local 'space' (a nil value)
errors:
$ tail -n 1 test/var/001_vinyl/vinyl.log
2020-03-07 02:08:39.649 [31087] main/139/lua utils.c:1028 E> LuajitError: ...s/tarantool-meta/tarantool/test/var/001_vinyl/stress.lua:83: attempt to index local 'space' (a nil value)
It is because box.once()
is used in test/vinyl/stress.lua (which is required from test/vinyl/stress.test.lua).