* [Tarantool-patches] [PATCH] test: fix flaky join_vclock test
@ 2019-12-13 19:55 Ilya Kosarev
0 siblings, 0 replies; 3+ messages in thread
From: Ilya Kosarev @ 2019-12-13 19:55 UTC (permalink / raw)
To: tarantool-patches; +Cc: v.shpilevoy
Under high load we might need to wait for all tuples to get to replica.
With applied fixes join_vclock test is not fragile anymore.
Closes #4160
---
Branch: https://github.com/tarantool/tarantool/tree/i.kosarev/gh-4160-fix-join-vclock-test
Issue: https://github.com/tarantool/tarantool/issues/4160
test/replication/join_vclock.result | 5 +----
test/replication/join_vclock.test.lua | 3 +--
test/replication/suite.ini | 1 -
3 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/test/replication/join_vclock.result b/test/replication/join_vclock.result
index a9781073d44..eb05f1f1a02 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.primary:count() - 1 end, 10)
---
- true
...
diff --git a/test/replication/join_vclock.test.lua b/test/replication/join_vclock.test.lua
index 0b60dffc2c0..08c3a26442b 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.primary:count() - 1 end, 10)
test_run:cmd("switch default")
replica_set.drop_all(test_run)
diff --git a/test/replication/suite.ini b/test/replication/suite.ini
index 384dac677ea..ed1de31405e 100644
--- a/test/replication/suite.ini
+++ b/test/replication/suite.ini
@@ -12,7 +12,6 @@ long_run = prune.test.lua
is_parallel = True
pretest_clean = True
fragile = errinj.test.lua ; gh-3870
- join_vclock.test.lua ; gh-4160
long_row_timeout.test.lua ; gh-4351
skip_conflict_row.test.lua ; gh-4457
sync.test.lua ; gh-3835 gh-3877
--
2.17.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Tarantool-patches] [PATCH] test: fix flaky join_vclock test
2019-12-13 19:05 Ilya Kosarev
@ 2019-12-13 19:36 ` Alexander Tikhonov
0 siblings, 0 replies; 3+ messages in thread
From: Alexander Tikhonov @ 2019-12-13 19:36 UTC (permalink / raw)
To: Ilya Kosarev; +Cc: v.shpilevoy, tarantool-patches
[-- Attachment #1: Type: text/plain, Size: 2436 bytes --]
From my side the fix is needed and the patch LGTM.
>Пятница, 13 декабря 2019, 22:05 +03:00 от Ilya Kosarev <i.kosarev@tarantool.org>:
>
>Under high load we might need to wait for all tuples to get to replica.
>With apllied fixes join_vclock test is not fragile anymore.
>
>Closes #4160
>---
>Branch: https://github.com/tarantool/tarantool/tree/i.kosarev/gh-4160-fix-join-vclock-test
>Issue: https://github.com/tarantool/tarantool/issues/4160
>
> test/replication/join_vclock.result | 5 +----
> test/replication/join_vclock.test.lua | 3 +--
> test/replication/suite.ini | 1 -
> 3 files changed, 2 insertions(+), 7 deletions(-)
>
>diff --git a/test/replication/join_vclock.result b/test/replication/join_vclock.result
>index a9781073d44..eb05f1f1a02 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.primary:count() - 1 end, 10)
> ---
> - true
> ...
>diff --git a/test/replication/join_vclock.test.lua b/test/replication/join_vclock.test.lua
>index 0b60dffc2c0..08c3a26442b 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.primary:count() - 1 end, 10)
> test_run:cmd("switch default")
>
> replica_set.drop_all(test_run)
>diff --git a/test/replication/suite.ini b/test/replication/suite.ini
>index 384dac677ea..ed1de31405e 100644
>--- a/test/replication/suite.ini
>+++ b/test/replication/suite.ini
>@@ -12,7 +12,6 @@ long_run = prune.test.lua
> is_parallel = True
> pretest_clean = True
> fragile = errinj.test.lua ; gh-3870
>- join_vclock.test.lua ; gh-4160
> long_row_timeout.test.lua ; gh-4351
> skip_conflict_row.test.lua ; gh-4457
> sync.test.lua ; gh-3835 gh-3877
>--
>2.17.1
>
--
Alexander Tikhonov
[-- Attachment #2: Type: text/html, Size: 3391 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Tarantool-patches] [PATCH] test: fix flaky join_vclock test
@ 2019-12-13 19:05 Ilya Kosarev
2019-12-13 19:36 ` Alexander Tikhonov
0 siblings, 1 reply; 3+ messages in thread
From: Ilya Kosarev @ 2019-12-13 19:05 UTC (permalink / raw)
To: tarantool-patches; +Cc: v.shpilevoy
Under high load we might need to wait for all tuples to get to replica.
With apllied fixes join_vclock test is not fragile anymore.
Closes #4160
---
Branch: https://github.com/tarantool/tarantool/tree/i.kosarev/gh-4160-fix-join-vclock-test
Issue: https://github.com/tarantool/tarantool/issues/4160
test/replication/join_vclock.result | 5 +----
test/replication/join_vclock.test.lua | 3 +--
test/replication/suite.ini | 1 -
3 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/test/replication/join_vclock.result b/test/replication/join_vclock.result
index a9781073d44..eb05f1f1a02 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.primary:count() - 1 end, 10)
---
- true
...
diff --git a/test/replication/join_vclock.test.lua b/test/replication/join_vclock.test.lua
index 0b60dffc2c0..08c3a26442b 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.primary:count() - 1 end, 10)
test_run:cmd("switch default")
replica_set.drop_all(test_run)
diff --git a/test/replication/suite.ini b/test/replication/suite.ini
index 384dac677ea..ed1de31405e 100644
--- a/test/replication/suite.ini
+++ b/test/replication/suite.ini
@@ -12,7 +12,6 @@ long_run = prune.test.lua
is_parallel = True
pretest_clean = True
fragile = errinj.test.lua ; gh-3870
- join_vclock.test.lua ; gh-4160
long_row_timeout.test.lua ; gh-4351
skip_conflict_row.test.lua ; gh-4457
sync.test.lua ; gh-3835 gh-3877
--
2.17.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-12-13 19:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-13 19:55 [Tarantool-patches] [PATCH] test: fix flaky join_vclock test Ilya Kosarev
-- strict thread matches above, loose matches on Subject: below --
2019-12-13 19:05 Ilya Kosarev
2019-12-13 19:36 ` Alexander Tikhonov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox