From 7420faaca30efa97a4f4722909236a5678c52f2f Mon Sep 17 00:00:00 2001 From: Georgy Moiseev Date: Wed, 7 Jun 2023 11:08:27 +0300 Subject: [PATCH] test: skip cartridge hotreload on old Tarantool 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! ``` --- deps.sh | 2 +- test/helper.lua | 14 ++++++++++++++ test/integration/cfg_test.lua | 1 + test/integration/ddl_sharding_info_reload_test.lua | 1 + test/integration/reload_test.lua | 2 ++ test/integration/stats_test.lua | 3 +++ 6 files changed, 22 insertions(+), 1 deletion(-) diff --git a/deps.sh b/deps.sh index 597da268..c1b76540 100755 --- a/deps.sh +++ b/deps.sh @@ -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 diff --git a/test/helper.lua b/test/helper.lua index 919b7766..8109fd66 100644 --- a/test/helper.lua +++ b/test/helper.lua @@ -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') @@ -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 diff --git a/test/integration/cfg_test.lua b/test/integration/cfg_test.lua index 3c583bca..1552b02d 100644 --- a/test/integration/cfg_test.lua +++ b/test/integration/cfg_test.lua @@ -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') diff --git a/test/integration/ddl_sharding_info_reload_test.lua b/test/integration/ddl_sharding_info_reload_test.lua index 0066b7af..0d631c3f 100644 --- a/test/integration/ddl_sharding_info_reload_test.lua +++ b/test/integration/ddl_sharding_info_reload_test.lua @@ -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') diff --git a/test/integration/reload_test.lua b/test/integration/reload_test.lua index 28b844bf..908178d2 100644 --- a/test/integration/reload_test.lua +++ b/test/integration/reload_test.lua @@ -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') @@ -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') diff --git a/test/integration/stats_test.lua b/test/integration/stats_test.lua index 5a55e46a..789cce39 100644 --- a/test/integration/stats_test.lua +++ b/test/integration/stats_test.lua @@ -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) @@ -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')") @@ -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')")