diff --git a/test/vinyl/errinj.result b/test/vinyl/errinj.result index 9b5f731406c008fc8a4b479ea3f80da3ae35f234..f4300333efce16817ee95d7d3984b272fdac7a0a 100644 --- a/test/vinyl/errinj.result +++ b/test/vinyl/errinj.result @@ -830,16 +830,20 @@ errinj.set("ERRINJ_VY_DELAY_PK_LOOKUP", true) --- - ok ... -f = fiber.create(do_read) +_ = fiber.create(do_read) --- ... -f:status() +test_run:wait_cond(function() return sk:stat().get.rows > 0 end, 60) --- -- suspended +- true ... -ret +pk:stat().get.rows -- 0 --- -- null +- 0 +... +sk:stat().get.rows -- 1 +--- +- 1 ... s:replace{2, 2} --- @@ -849,8 +853,17 @@ errinj.set("ERRINJ_VY_DELAY_PK_LOOKUP", false) --- - ok ... -while ret == nil do fiber.sleep(0.01) end +test_run:wait_cond(function() return pk:stat().get.rows > 0 end, 60) --- +- true +... +pk:stat().get.rows -- 1 +--- +- 1 +... +sk:stat().get.rows -- 1 +--- +- 1 ... ret --- diff --git a/test/vinyl/errinj.test.lua b/test/vinyl/errinj.test.lua index 5c7a525f8ea004d1360d1cfc6d76d8b78e746a78..bb61a9a58f758ec8210a62a55461d0e73df5276a 100644 --- a/test/vinyl/errinj.test.lua +++ b/test/vinyl/errinj.test.lua @@ -298,12 +298,15 @@ box.snapshot() ret = nil function do_read() ret = sk:select({2}, {iterator = 'GE'}) end errinj.set("ERRINJ_VY_DELAY_PK_LOOKUP", true) -f = fiber.create(do_read) -f:status() -ret +_ = fiber.create(do_read) +test_run:wait_cond(function() return sk:stat().get.rows > 0 end, 60) +pk:stat().get.rows -- 0 +sk:stat().get.rows -- 1 s:replace{2, 2} errinj.set("ERRINJ_VY_DELAY_PK_LOOKUP", false) -while ret == nil do fiber.sleep(0.01) end +test_run:wait_cond(function() return pk:stat().get.rows > 0 end, 60) +pk:stat().get.rows -- 1 +sk:stat().get.rows -- 1 ret s:drop()