From: Georgy Kirichenko <georgy@tarantool.org> To: tarantool-patches@freelists.org Cc: Georgy Kirichenko <georgy@tarantool.org> Subject: [tarantool-patches] [PATCH v3 14/14] test: fix flaky test Date: Sun, 9 Jun 2019 23:44:43 +0300 [thread overview] Message-ID: <b17396d1863378f6ad44eba07ca724460c86a247.1560112747.git.georgy@tarantool.org> (raw) In-Reply-To: <cover.1560112747.git.georgy@tarantool.org> This test fails sporadically --- test/replication/sync.result | 7 +++++-- test/replication/sync.test.lua | 4 ++-- test/replication/transaction.result | 16 +++++++++++++++- test/replication/transaction.test.lua | 7 ++++++- 4 files changed, 28 insertions(+), 6 deletions(-) diff --git a/test/replication/sync.result b/test/replication/sync.result index eddc7cbc8..6b5a14d3f 100644 --- a/test/replication/sync.result +++ b/test/replication/sync.result @@ -46,7 +46,7 @@ function fill() box.space.test:replace{i} end fiber.create(function() - box.error.injection.set('ERRINJ_RELAY_TIMEOUT', 0.1) + box.error.injection.set('ERRINJ_RELAY_TIMEOUT', 0.0025) test_run:wait_cond(function() local r = box.info.replication[2] return r ~= nil and r.downstream ~= nil and @@ -55,7 +55,6 @@ function fill() for i = count + 101, count + 200 do box.space.test:replace{i} end - box.error.injection.set('ERRINJ_RELAY_TIMEOUT', 0) end) count = count + 200 end; @@ -250,6 +249,10 @@ test_run:cmd("switch default") --- - true ... +box.error.injection.set('ERRINJ_RELAY_TIMEOUT', 0) +--- +- ok +... box.error.injection.set('ERRINJ_WAL_DELAY', true) --- - ok diff --git a/test/replication/sync.test.lua b/test/replication/sync.test.lua index 52ce88fe2..f0f530ad4 100644 --- a/test/replication/sync.test.lua +++ b/test/replication/sync.test.lua @@ -30,7 +30,7 @@ function fill() box.space.test:replace{i} end fiber.create(function() - box.error.injection.set('ERRINJ_RELAY_TIMEOUT', 0.1) + box.error.injection.set('ERRINJ_RELAY_TIMEOUT', 0.0025) test_run:wait_cond(function() local r = box.info.replication[2] return r ~= nil and r.downstream ~= nil and @@ -39,7 +39,6 @@ function fill() for i = count + 101, count + 200 do box.space.test:replace{i} end - box.error.injection.set('ERRINJ_RELAY_TIMEOUT', 0) end) count = count + 200 end; @@ -136,6 +135,7 @@ box.cfg{replication_sync_lag = 1} box.cfg{replication_sync_timeout = 10} test_run:cmd("switch default") +box.error.injection.set('ERRINJ_RELAY_TIMEOUT', 0) box.error.injection.set('ERRINJ_WAL_DELAY', true) test_run:cmd("setopt delimiter ';'") _ = fiber.create(function() diff --git a/test/replication/transaction.result b/test/replication/transaction.result index 8c2ac6ee4..c54c1e8d5 100644 --- a/test/replication/transaction.result +++ b/test/replication/transaction.result @@ -7,12 +7,21 @@ test_run = env.new() box.schema.user.grant('guest', 'replication') --- ... -s = box.schema.space.create('test', {engine = test_run:get_cfg('engine')}) +engine = test_run:get_cfg('engine') +--- +... +s = box.schema.space.create('test', {engine = engine}) --- ... _ = s:create_index('pk') --- ... +l = box.schema.space.create('l_space', {engine = engine, is_local = true}) +--- +... +_ = l:create_index('pk') +--- +... -- transaction w/o conflict box.begin() s:insert({1, 'm'}) s:insert({2, 'm'}) box.commit() --- @@ -92,6 +101,11 @@ box.cfg{replication = replication} --- ... -- replication stopped of third transaction +-- flush wal +box.space.l_space:replace({1}) +--- +- [1] +... v1[1] + 2 == box.info.vclock[1] --- - true diff --git a/test/replication/transaction.test.lua b/test/replication/transaction.test.lua index f25a4737d..4e0323128 100644 --- a/test/replication/transaction.test.lua +++ b/test/replication/transaction.test.lua @@ -1,9 +1,12 @@ env = require('test_run') test_run = env.new() box.schema.user.grant('guest', 'replication') +engine = test_run:get_cfg('engine') -s = box.schema.space.create('test', {engine = test_run:get_cfg('engine')}) +s = box.schema.space.create('test', {engine = engine}) _ = s:create_index('pk') +l = box.schema.space.create('l_space', {engine = engine, is_local = true}) +_ = l:create_index('pk') -- transaction w/o conflict box.begin() s:insert({1, 'm'}) s:insert({2, 'm'}) box.commit() @@ -37,6 +40,8 @@ replication = box.cfg.replication box.cfg{replication = {}} box.cfg{replication = replication} -- replication stopped of third transaction +-- flush wal +box.space.l_space:replace({1}) v1[1] + 2 == box.info.vclock[1] box.space.test:select() -- check replication status -- 2.21.0
prev parent reply other threads:[~2019-06-09 20:45 UTC|newest] Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-06-09 20:44 [tarantool-patches] [PATCH v3 00/14] Parallel applier Georgy Kirichenko 2019-06-09 20:44 ` [tarantool-patches] [PATCH v3 01/14] txn: Fire a trigger after a transaction finalization Georgy Kirichenko 2019-06-09 21:59 ` [tarantool-patches] " Konstantin Osipov 2019-06-11 11:42 ` [tarantool-patches] " Vladimir Davydov 2019-06-09 20:44 ` [tarantool-patches] [PATCH v3 02/14] ddl: synchronize privileges cache with actual data state Georgy Kirichenko 2019-06-11 13:13 ` Vladimir Davydov 2019-06-09 20:44 ` [tarantool-patches] [PATCH v3 03/14] txn: transaction memory allocation Georgy Kirichenko 2019-06-09 20:44 ` [tarantool-patches] [PATCH v3 04/14] ddl: place alter structures onto a txn memory region Georgy Kirichenko 2019-06-11 14:14 ` Vladimir Davydov 2019-06-09 20:44 ` [tarantool-patches] [PATCH v3 05/14] txn: get rid of autocommit from a txn structure Georgy Kirichenko 2019-06-13 14:11 ` Vladimir Davydov 2019-06-16 16:20 ` [tarantool-patches] " Konstantin Osipov 2019-06-16 16:14 ` Konstantin Osipov 2019-06-09 20:44 ` [tarantool-patches] [PATCH v3 06/14] txn: get rid of fiber_gc from txn_rollback Georgy Kirichenko 2019-06-13 14:12 ` Vladimir Davydov 2019-06-13 19:28 ` Георгий Кириченко 2019-06-14 9:21 ` Vladimir Davydov 2019-06-16 16:38 ` [tarantool-patches] " Konstantin Osipov 2019-06-09 20:44 ` [tarantool-patches] [PATCH v3 07/14] wal: remove fiber from a journal_entry structure Georgy Kirichenko 2019-06-13 14:17 ` Vladimir Davydov 2019-06-13 19:33 ` Георгий Кириченко 2019-06-14 8:05 ` Vladimir Davydov 2019-06-09 20:44 ` [tarantool-patches] [PATCH v3 08/14] wal: enable asyncronous wal writes Georgy Kirichenko 2019-06-13 14:21 ` Vladimir Davydov 2019-06-09 20:44 ` [tarantool-patches] [PATCH v3 09/14] wal: a dedicated wal scheduling fiber Georgy Kirichenko 2019-06-13 14:24 ` Vladimir Davydov 2019-06-13 19:36 ` Георгий Кириченко 2019-06-14 9:20 ` Vladimir Davydov 2019-06-09 20:44 ` [tarantool-patches] [PATCH v3 10/14] core: latch_unlock_external routine Georgy Kirichenko 2019-06-13 14:27 ` Vladimir Davydov 2019-06-13 19:38 ` Георгий Кириченко 2019-06-14 8:10 ` Vladimir Davydov 2019-06-14 9:18 ` Vladimir Davydov 2019-06-09 20:44 ` [tarantool-patches] [PATCH v3 11/14] txn: introduce asynchronous txn commit Georgy Kirichenko 2019-06-13 14:34 ` Vladimir Davydov 2019-06-13 19:45 ` Георгий Кириченко 2019-06-14 7:58 ` Vladimir Davydov 2019-06-09 20:44 ` [tarantool-patches] [PATCH v3 12/14] txn: handle fiber stop event at transaction level Georgy Kirichenko 2019-06-13 14:36 ` Vladimir Davydov 2019-06-09 20:44 ` [tarantool-patches] [PATCH v3 13/14] applier: apply transaction in parallel Georgy Kirichenko 2019-06-13 15:17 ` Vladimir Davydov 2019-06-09 20:44 ` Georgy Kirichenko [this message]
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=b17396d1863378f6ad44eba07ca724460c86a247.1560112747.git.georgy@tarantool.org \ --to=georgy@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='Re: [tarantool-patches] [PATCH v3 14/14] test: fix flaky test' \ /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