Tarantool development patches archive
 help / color / mirror / Atom feed
* [tarantool-patches] [PATCH v1] test: join_vclock test needs fix for high load
@ 2019-04-16  8:01 avtikhon
  2019-05-08 13:55 ` [tarantool-patches] " Alexander Turenko
  0 siblings, 1 reply; 2+ messages in thread
From: avtikhon @ 2019-04-16  8:01 UTC (permalink / raw)
  To: Alexander Turenko; +Cc: avtikhon, tarantool-patches

Join vclock test failed on high load, to resolve it
need to add wait condition routine:

[015] Test failed! Result content mismatch:
[015] --- replication/join_vclock.result Fri Apr 12 14:49:26 2019
[015] +++ replication/join_vclock.reject Mon Apr 15 17:10:13 2019
[015] @@ -72,7 +72,7 @@
[015] ...
[015] box.space.test.index.primary:max()[1] == cnt - 1
[015] ---
[015] -- true
[015] +- false
[015] ...
[015] test_run:cmd("switch default")
[015] ---

Close #4160
---

Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh4160-join-vclock-highload
Issue: https://github.com/tarantool/tarantool/issues/4160

 test/replication/join_vclock.result   | 5 +----
 test/replication/join_vclock.test.lua | 3 +--
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/test/replication/join_vclock.result b/test/replication/join_vclock.result
index a9781073d..050f68ea6 100644
--- a/test/replication/join_vclock.result
+++ b/test/replication/join_vclock.result
@@ -67,10 +67,7 @@ test_run:cmd("switch replica1")
 ---
 - true
 ...
-cnt = box.space.test.index[0]:count()
----
-...
-box.space.test.index.primary:max()[1] == cnt - 1
+test_run:wait_cond(function() return box.space.test.index.primary:max()[1] == box.space.test.index[0]:count() - 1 end) or box.space.test.index[0]:count()
 ---
 - true
 ...
diff --git a/test/replication/join_vclock.test.lua b/test/replication/join_vclock.test.lua
index 0b60dffc2..a404cb48d 100644
--- a/test/replication/join_vclock.test.lua
+++ b/test/replication/join_vclock.test.lua
@@ -26,8 +26,7 @@ ch:get()
 
 errinj.set("ERRINJ_RELAY_FINAL_SLEEP", false)
 test_run:cmd("switch replica1")
-cnt = box.space.test.index[0]:count()
-box.space.test.index.primary:max()[1] == cnt - 1
+test_run:wait_cond(function() return box.space.test.index.primary:max()[1] == box.space.test.index[0]:count() - 1 end) or box.space.test.index[0]:count()
 test_run:cmd("switch default")
 
 replica_set.drop_all(test_run)
-- 
2.17.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-08 13:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-16  8:01 [tarantool-patches] [PATCH v1] test: join_vclock test needs fix for high load avtikhon
2019-05-08 13:55 ` [tarantool-patches] " Alexander Turenko

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