Tarantool development patches archive
 help / color / mirror / Atom feed
From: avtikhon <avtikhon@tarantool.org>
To: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: avtikhon <avtikhon@tarantool.org>, tarantool-patches@freelists.org
Subject: [PATCH v1] test: errinj* tests need fixes for stress runs
Date: Mon,  6 May 2019 18:08:06 +0300	[thread overview]
Message-ID: <d64e4c95f1b72d1f32f9689a33319545506e1c58.1557155230.git.avtikhon@tarantool.org> (raw)

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

             reply	other threads:[~2019-05-06 15:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-06 15:08 avtikhon [this message]
2019-05-06 15:54 ` Vladimir Davydov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d64e4c95f1b72d1f32f9689a33319545506e1c58.1557155230.git.avtikhon@tarantool.org \
    --to=avtikhon@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=vdavydov.dev@gmail.com \
    --subject='Re: [PATCH v1] test: errinj* tests need fixes for stress runs' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox