[Tarantool-patches] [PATCH 1/1] test: fix flaky qsync_with_anon.test.lua

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Tue Jul 14 00:55:06 MSK 2020


The test used very small timeout, 0.1 second, to test that a sync
transaction works fine. But with too much load on the machine this
may appear not enough. Now in the cases where the timeout wasn't
supposed to explode the value 1000 seconds is used, more than
enough.

Closes #5165
---
Branch: http://github.com/tarantool/tarantool/tree/gerold103/gh-5165-qsync_with_anon-flaky
Issue: https://github.com/tarantool/tarantool/issues/5165

 test/replication/qsync_with_anon.result   | 4 ++--
 test/replication/qsync_with_anon.test.lua | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/test/replication/qsync_with_anon.result b/test/replication/qsync_with_anon.result
index 59506a608..51f02bcdb 100644
--- a/test/replication/qsync_with_anon.result
+++ b/test/replication/qsync_with_anon.result
@@ -48,7 +48,7 @@ test_run:switch('default')
  | ---
  | - true
  | ...
-box.cfg{replication_synchro_quorum=NUM_INSTANCES, replication_synchro_timeout=0.1}
+box.cfg{replication_synchro_quorum=NUM_INSTANCES, replication_synchro_timeout=1000}
  | ---
  | ...
 _ = box.schema.space.create('sync', {is_sync=true, engine=engine})
@@ -126,7 +126,7 @@ test_run:switch('default')
  | ---
  | - true
  | ...
-box.cfg{replication_synchro_quorum=NUM_INSTANCES}
+box.cfg{replication_synchro_quorum=NUM_INSTANCES, replication_synchro_timeout=1000}
  | ---
  | ...
 box.space.sync:insert{1} -- success
diff --git a/test/replication/qsync_with_anon.test.lua b/test/replication/qsync_with_anon.test.lua
index aed62775e..5bc7c8be4 100644
--- a/test/replication/qsync_with_anon.test.lua
+++ b/test/replication/qsync_with_anon.test.lua
@@ -19,7 +19,7 @@ test_run:cmd('switch replica_anon')
 -- replica.
 -- Testcase setup.
 test_run:switch('default')
-box.cfg{replication_synchro_quorum=NUM_INSTANCES, replication_synchro_timeout=0.1}
+box.cfg{replication_synchro_quorum=NUM_INSTANCES, replication_synchro_timeout=1000}
 _ = box.schema.space.create('sync', {is_sync=true, engine=engine})
 _ = box.space.sync:create_index('pk')
 -- Testcase body.
@@ -45,7 +45,7 @@ box.space.sync:insert{1} -- failure
 test_run:cmd('switch replica_anon')
 box.space.sync:select{} -- none
 test_run:switch('default')
-box.cfg{replication_synchro_quorum=NUM_INSTANCES}
+box.cfg{replication_synchro_quorum=NUM_INSTANCES, replication_synchro_timeout=1000}
 box.space.sync:insert{1} -- success
 test_run:cmd('switch replica_anon')
 box.space.sync:select{} -- 1
-- 
2.21.1 (Apple Git-122.3)



More information about the Tarantool-patches mailing list