test: fix flaky tests when JIT is enabled
<box/net.box_reconnect_after_gh-3164.test.lua> and <vinyl/tx_gap_lock.test.lua> checking some objects that should be collected may fail because these objects are referenced as the upvalues for a function inlined on some JIT trace. The objects aren't leaked; tests don't consider the JIT semantics. See more details in [1]. This patch disables JIT for the first test. The second test itself isn't affected since the commit tarantool/test-run@33fbace8307e64e66b0b2178ac952b2697673917 ("Add default server restart to each test run"). Because of this commit, the `tx.gap_locks` can't be affected by the use of the `create_iterator()` function in other tests. But to avoid similar situations in the future, the JIT is disabled for the `res.next()` function in test utils. [1]: https://github.com/tarantool/tarantool/wiki/LuaJIT-function-inlining Closes tarantool/tarantool-qa#233 Closes tarantool/tarantool-qa#276 NO_DOC=fix flaky test NO_CHANGELOG=see NO_DOC (cherry picked from commit 1a5e3bf3)
Showing
- test/box/lua/utils.lua 7 additions, 0 deletionstest/box/lua/utils.lua
- test/box/net.box_reconnect_after_gh-3164.result 8 additions, 0 deletionstest/box/net.box_reconnect_after_gh-3164.result
- test/box/net.box_reconnect_after_gh-3164.test.lua 7 additions, 0 deletionstest/box/net.box_reconnect_after_gh-3164.test.lua
Please register or sign in to comment