Skip to content

Commit

Permalink
test: skip cartridge hotreload on old Tarantool
Browse files Browse the repository at this point in the history
Running tests for cartridge roles reload with vshard 0.1.22+ may
stuck on old Tarantool versions (1.10.6, 2.2, 2.3, 2.4). The reason is
rather unclear (it is somehow related to new vshard retrying utils),
but since it concerns out of support versions, it is not worth to
inspect it too long or file an issue.

```
main/137/vshard.recovery util.lua:103 E> recovery_f has been failed: .../.rocks/share/tarantool/vshard/storage/init.lua:1268: assertion failed!
main/136/vshard.gc util.lua:103 E> gc_bucket_f has been failed: .../.rocks/share/tarantool/vshard/storage/init.lua:2530: assertion failed!
```
  • Loading branch information
DifferentialOrange committed Jun 7, 2023
1 parent 8f6eff1 commit 7420faa
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
set -e

# Test dependencies:
tarantoolctl rocks install luatest 0.5.7
tarantoolctl rocks install luatest
tarantoolctl rocks install luacheck 0.25.0
tarantoolctl rocks install luacov 0.13.0

Expand Down
14 changes: 14 additions & 0 deletions test/helper.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
require('strict').on()

local t = require('luatest')
local luatest_utils = require('luatest.utils')

local log = require('log')
local checks = require('checks')
Expand Down Expand Up @@ -551,4 +552,17 @@ function helpers.is_cartridge_hotreload_supported()
return crud_utils.is_cartridge_hotreload_supported()
end

function helpers.skip_old_tarantool_cartridge_hotreload()
-- Cartridge hotreload tests stuck for vshard 0.1.22+ on Tarantool 1.10.6, 2.2, 2.3 and 2.4.
-- Logs display a lot of following errors:
-- main/137/vshard.recovery util.lua:103 E> recovery_f has been failed: .../.rocks/share/tarantool/vshard/storage/init.lua:1268: assertion failed!
-- main/136/vshard.gc util.lua:103 E> gc_bucket_f has been failed: .../.rocks/share/tarantool/vshard/storage/init.lua:2530: assertion failed!
local tarantool_version = luatest_utils.get_tarantool_version()
t.skip_if(luatest_utils.version_ge(luatest_utils.version(1, 10, 13), tarantool_version),
"Cartridge hotreload tests stuck for vshard 0.1.22+ on Tarantool 1.10.6")
t.skip_if(luatest_utils.version_ge(tarantool_version, luatest_utils.version(2, 0, 0))
and luatest_utils.version_ge(luatest_utils.version(2, 5, 1), tarantool_version),
"Cartridge hotreload tests stuck for vshard 0.1.22+ on Tarantool 2.2, 2.3 and 2.4")
end

return helpers
1 change: 1 addition & 0 deletions test/integration/cfg_test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ end
group.test_role_reload_preserves_values = function(g)
t.skip_if(not helpers.is_cartridge_hotreload_supported(),
"Cartridge roles reload is not supported")
helpers.skip_old_tarantool_cartridge_hotreload()

local router = g.cluster:server('router')

Expand Down
1 change: 1 addition & 0 deletions test/integration/ddl_sharding_info_reload_test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ for sharding_case_name, sharding_case in pairs(sharding_cases) do
((reload_case == 'reload_roles')
and not helpers.is_cartridge_hotreload_supported()),
"Cartridge roles reload is not supported")
helpers.skip_old_tarantool_cartridge_hotreload()

local storage = g.cluster:server('s1-master')

Expand Down
2 changes: 2 additions & 0 deletions test/integration/reload_test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ end)
function g.test_router()
t.skip_if(not helpers.is_cartridge_hotreload_supported(),
"Cartridge roles reload is not supported")
helpers.skip_old_tarantool_cartridge_hotreload()

g.highload_fiber = fiber.new(highload_loop, 'A')

Expand All @@ -104,6 +105,7 @@ end
function g.test_storage()
t.skip_if(not helpers.is_cartridge_hotreload_supported(),
"Cartridge roles reload is not supported")
helpers.skip_old_tarantool_cartridge_hotreload()

g.highload_fiber = fiber.new(highload_loop, 'B')

Expand Down
3 changes: 3 additions & 0 deletions test/integration/stats_test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,7 @@ pgroup.test_role_reload_do_not_reset_observations = function(g)
t.skip_if((g.params.args.driver == 'metrics')
and helpers.is_metrics_0_12_0_or_older(),
"See https://github.com/tarantool/metrics/issues/334")
helpers.skip_old_tarantool_cartridge_hotreload()

local stats_before = get_stats(g)

Expand Down Expand Up @@ -1091,6 +1092,7 @@ group_metrics.test_role_reload_do_not_reset_metrics_observations = function(g)
"Cartridge roles reload is not supported")
t.skip_if(helpers.is_metrics_0_12_0_or_older(),
"See https://github.com/tarantool/metrics/issues/334")
helpers.skip_old_tarantool_cartridge_hotreload()

helpers.reload_roles(g.cluster:server('router'))
g.router:eval("crud = require('crud')")
Expand Down Expand Up @@ -1130,6 +1132,7 @@ group_metrics.before_test(
group_metrics.test_stats_changed_in_metrics_registry_after_role_reload = function(g)
t.skip_if(not helpers.is_cartridge_hotreload_supported(),
"Cartridge roles reload is not supported")
helpers.skip_old_tarantool_cartridge_hotreload()

helpers.reload_roles(g.cluster:server('router'))
g.router:eval("crud = require('crud')")
Expand Down

0 comments on commit 7420faa

Please sign in to comment.