From ca53ded8db84bede8dde930d67394a08fd9e2840 Mon Sep 17 00:00:00 2001 From: Igor Zolotarev Date: Wed, 3 Jul 2024 21:14:08 +0300 Subject: [PATCH] Fix broken disk_failure_test --- test/integration/disk_failure_test.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/integration/disk_failure_test.lua b/test/integration/disk_failure_test.lua index 0b4142176..085975ac5 100644 --- a/test/integration/disk_failure_test.lua +++ b/test/integration/disk_failure_test.lua @@ -10,6 +10,7 @@ g.before_all(function() datadir = fio.tempdir(), server_command = helpers.entrypoint('srv_basic'), cookie = helpers.random_cookie(), + use_vshard = true, replicasets = { { alias = 'router', roles = {'vshard-router'}, @@ -46,10 +47,12 @@ function g.test_disk_failure_disable() -- first DC disk is down sharded_storage_1:exec(function() - package.loaded.fio.lstat = function () return false end + rawset(_G, 'old_lstat', package.loaded.fio.lstat) + package.loaded.fio.lstat = function () return nil end end) simple_storage_1:exec(function() - package.loaded.fio.lstat = function () return false end + rawset(_G, 'old_lstat', package.loaded.fio.lstat) + package.loaded.fio.lstat = function () return nil end end) -- check disabled instances @@ -122,10 +125,10 @@ function g.test_disk_failure_disable() -- first DC disk is alright sharded_storage_1:exec(function() - package.loaded.fio.lstat = function() return true end + package.loaded.fio.lstat = _G.old_lstat end) simple_storage_1:exec(function() - package.loaded.fio.lstat = function() return true end + package.loaded.fio.lstat = _G.old_lstat end) -- enable it back