From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: avtikhon Subject: [PATCH v1] test: errinj* tests need fixes for stress runs Date: Mon, 6 May 2019 18:08:06 +0300 Message-Id: To: Vladimir Davydov Cc: avtikhon , tarantool-patches@freelists.org List-ID: Tests failed with the following issues: [010] --- vinyl/errinj.result Tue Mar 19 17:52:48 2019 [010] +++ vinyl/errinj.reject Tue Mar 19 19:07:58 2019 [010] @@ -81,7 +81,7 @@ [010] -- fails due to scheduler timeout [010] box.snapshot(); [010] --- [010] -- error: Error injection 'vinyl dump' [010] +- ok [010] ... [010] fiber.sleep(0.06); [010] --- [010] Decided to remove the current check for box snapshot fail on scheduler timeout. [035] --- vinyl/errinj_stat.result Mon May 6 13:11:27 2019 [035] +++ vinyl/errinj_stat.reject Mon May 6 17:58:48 2019 [035] @@ -250,7 +250,7 @@ [035] ... [035] box.snapshot() [035] --- [035] -- ok [035] +- error: Error injection 'vinyl dump' [035] ... [035] i:compact() [035] --- [035] Decided to add the wait condition checker of the scheduler tasks_completed number instead of the fiber delay. Close #4058 --- Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-4058-vinyl-errinj-stress Issue: https://github.com/tarantool/tarantool/issues/4058 test/vinyl/errinj.result | 5 ----- test/vinyl/errinj.test.lua | 2 -- test/vinyl/errinj_stat.result | 3 ++- test/vinyl/errinj_stat.test.lua | 2 +- 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/test/vinyl/errinj.result b/test/vinyl/errinj.result index c69347da6..e8795143f 100644 --- a/test/vinyl/errinj.result +++ b/test/vinyl/errinj.result @@ -78,11 +78,6 @@ errinj.set("ERRINJ_VY_RUN_WRITE", false); --- - ok ... --- fails due to scheduler timeout -box.snapshot(); ---- -- error: Error injection 'vinyl dump' -... fiber.sleep(0.06); --- ... diff --git a/test/vinyl/errinj.test.lua b/test/vinyl/errinj.test.lua index c3ce9706f..034ed34ce 100644 --- a/test/vinyl/errinj.test.lua +++ b/test/vinyl/errinj.test.lua @@ -38,8 +38,6 @@ num_rows = num_rows + range(); -- fails due to error injection box.snapshot(); errinj.set("ERRINJ_VY_RUN_WRITE", false); --- fails due to scheduler timeout -box.snapshot(); fiber.sleep(0.06); num_rows = num_rows + range(); box.snapshot(); diff --git a/test/vinyl/errinj_stat.result b/test/vinyl/errinj_stat.result index f1133137e..a8b5e0312 100644 --- a/test/vinyl/errinj_stat.result +++ b/test/vinyl/errinj_stat.result @@ -245,8 +245,9 @@ errinj.set('ERRINJ_VY_SCHED_TIMEOUT', 0) --- - ok ... -fiber.sleep(0.01) +test_run:wait_cond(function() return box.stat.vinyl().scheduler.tasks_completed > 1 end) --- +- true ... box.snapshot() --- diff --git a/test/vinyl/errinj_stat.test.lua b/test/vinyl/errinj_stat.test.lua index d11da4501..f331d9c2d 100644 --- a/test/vinyl/errinj_stat.test.lua +++ b/test/vinyl/errinj_stat.test.lua @@ -74,7 +74,7 @@ stat.tasks_completed == 1 stat.tasks_failed > 0 errinj.set('ERRINJ_VY_RUN_WRITE', false) errinj.set('ERRINJ_VY_SCHED_TIMEOUT', 0) -fiber.sleep(0.01) +test_run:wait_cond(function() return box.stat.vinyl().scheduler.tasks_completed > 1 end) box.snapshot() i:compact() test_run:wait_cond(function() return i:stat().disk.compaction.count > 0 end) -- 2.17.1