Skip to content

Commit 83c2fdc

Browse files
committed
Fix tests after fast/safe mode changes
* add access to _bucket space in privillage tests * fix select_readview_test * enable double buckets test * add safe_mode_disable for cartirdge reload test: test_storage * add safe_mode_disable for test_any_vshard_call_timeout
1 parent 3f360a6 commit 83c2fdc

File tree

6 files changed

+24
-8
lines changed

6 files changed

+24
-8
lines changed

crud/common/call.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ local function call_with_retry_and_recovery(vshard_router,
125125

126126
-- This is a partial copy of error handling from vshard.router.router_call_impl()
127127
-- It is much simpler mostly because bucket_set() can't be accessed from outside vshard.
128-
-- may be we cant get this -- todo: check
129128
if err.class_name == bucket_ref_unref.BucketRefError.name then
130129
local redirect_replicaset
131130
if is_single_call and #err.bucket_ref_errs == 1 then

test/integration/cartridge_reload_test.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,11 @@ function g.test_storage()
113113
t.skip_if(not helpers.is_cartridge_hotreload_supported(),
114114
"Cartridge roles reload is not supported")
115115
helpers.skip_old_tarantool_cartridge_hotreload()
116+
helpers.call_on_storages(g.cluster, function(server)
117+
server.net_box:eval([[
118+
require('crud.common.rebalance').safe_mode_disable()
119+
]])
120+
end)
116121

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

test/integration/double_buckets_test.lua

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ end)
5757
--- Rebalance stalls if we move all buckets at once; use a small subset.
5858
local test_tuples = {
5959
{22, box.NULL, 'Alex', 34},
60-
-- {92, box.NULL, 'Artur', 29},
61-
-- {3, box.NULL, 'Anastasia', 22},
62-
-- {5, box.NULL, 'Sergey', 25},
63-
-- {9, box.NULL, 'Anna', 30},
64-
-- {71, box.NULL, 'Oksana', 29},
60+
{92, box.NULL, 'Artur', 29},
61+
{3, box.NULL, 'Anastasia', 22},
62+
{5, box.NULL, 'Sergey', 25},
63+
{9, box.NULL, 'Anna', 30},
64+
{71, box.NULL, 'Oksana', 29},
6565
}
6666

6767
local last_call = fiber.time()
@@ -120,7 +120,6 @@ pgroup_duplicates.test_duplicates = function(g)
120120
'test implemented only for 3.1 and greater'
121121
)
122122
if g.params.backend == "config" then
123-
t.xfail('not implemented yet')
124123
duplicate_operations[g.params.operation](g)
125124

126125
local cfg = g.cluster:cfg()
@@ -246,8 +245,8 @@ pgroup_not_applied.test_not_applied = function(g)
246245
),
247246
'test implemented only for 3.1 and greater'
248247
)
248+
t.skip_if(g.params.operation == 'get' and g.params.safe_mode == false, 'todo: rework get')
249249
if g.params.backend == "config" then
250-
t.xfail('not implemented yet')
251250
local tuples, tuples_count = {}, 1000
252251
for i = 1, tuples_count do
253252
tuples[i] = {i, box.NULL, 'John Fedor', 42}

test/integration/privileges_test.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ local function privilegies_test_base_init(g, access_operation_type)
123123
if access_operation_type and box.space.customers then
124124
box.schema.user.grant('testuser1', access_operation_type, 'space', 'customers')
125125
end
126+
if box.space._bucket then
127+
box.schema.user.grant('testuser1', 'read', 'space', '_bucket')
128+
end
126129

127130
box.session.su(user)
128131
end

test/integration/select_readview_test.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2353,6 +2353,11 @@ end)
23532353

23542354
pgroup.test_select_switch_master = function(g)
23552355
helpers.skip_not_cartridge_backend(g.params.backend)
2356+
helpers.call_on_storages(g.cluster, function(server)
2357+
server.net_box:eval([[
2358+
require('crud.common.rebalance').safe_mode_disable()
2359+
]])
2360+
end)
23562361

23572362
helpers.insert_objects(g, 'customers', {
23582363
{

test/unit/call_test.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,11 @@ pgroup.test_any_vshard_call = function(g)
242242
end
243243

244244
pgroup.test_any_vshard_call_timeout = function(g)
245+
helpers.call_on_storages(g.cluster, function(server)
246+
server.net_box:eval([[
247+
require('crud.common.rebalance').safe_mode_disable()
248+
]])
249+
end)
245250
local timeout = 0.2
246251

247252
local results, err = g.router:eval([[

0 commit comments

Comments
 (0)