* [tarantool-patches] [PATCH] replication: stability fix for test recover_missing_xlog
@ 2018-05-18 17:01 Konstantin Belyavskiy
2018-05-19 20:49 ` [tarantool-patches] " Konstantin Osipov
0 siblings, 1 reply; 2+ messages in thread
From: Konstantin Belyavskiy @ 2018-05-18 17:01 UTC (permalink / raw)
To: georgy; +Cc: tarantool-patches
This test falls from time to time, because .xlog may have a
different number in a name (and using box.info.lsn is not an
option here).
Since it's setup of two masters, it could be one or two xlogs
in a folder, so first get a list of all matching files and then
delete the last one.
---
branch: https://github.com/tarantool/tarantool/tree/fix-recover-missing-xlog-test
test/replication/recover_missing_xlog.result | 5 ++++-
test/replication/recover_missing_xlog.test.lua | 3 ++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/test/replication/recover_missing_xlog.result b/test/replication/recover_missing_xlog.result
index 027f8761e..1947b6c0e 100644
--- a/test/replication/recover_missing_xlog.result
+++ b/test/replication/recover_missing_xlog.result
@@ -62,7 +62,10 @@ fio = require('fio')
-- all missing data from replica.
-- Also check that there is no concurrency, i.e. master is
-- in 'read-only' mode unless it receives all data.
-fio.unlink(fio.pathjoin(fio.abspath("."), string.format('autobootstrap1/%020d.xlog', 8)))
+list = fio.glob(fio.pathjoin(fio.abspath("."), 'autobootstrap1/*.xlog'))
+---
+...
+fio.unlink(list[#list])
---
- true
...
diff --git a/test/replication/recover_missing_xlog.test.lua b/test/replication/recover_missing_xlog.test.lua
index 57bc7d31f..d33b80399 100644
--- a/test/replication/recover_missing_xlog.test.lua
+++ b/test/replication/recover_missing_xlog.test.lua
@@ -27,7 +27,8 @@ fio = require('fio')
-- all missing data from replica.
-- Also check that there is no concurrency, i.e. master is
-- in 'read-only' mode unless it receives all data.
-fio.unlink(fio.pathjoin(fio.abspath("."), string.format('autobootstrap1/%020d.xlog', 8)))
+list = fio.glob(fio.pathjoin(fio.abspath("."), 'autobootstrap1/*.xlog'))
+fio.unlink(list[#list])
test_run:cmd("start server autobootstrap1")
test_run:cmd("switch autobootstrap1")
--
2.14.3 (Apple Git-98)
^ permalink raw reply [flat|nested] 2+ messages in thread
* [tarantool-patches] Re: [PATCH] replication: stability fix for test recover_missing_xlog
2018-05-18 17:01 [tarantool-patches] [PATCH] replication: stability fix for test recover_missing_xlog Konstantin Belyavskiy
@ 2018-05-19 20:49 ` Konstantin Osipov
0 siblings, 0 replies; 2+ messages in thread
From: Konstantin Osipov @ 2018-05-19 20:49 UTC (permalink / raw)
To: tarantool-patches; +Cc: georgy
* Konstantin Belyavskiy <k.belyavskiy@tarantool.org> [18/05/18 21:01]:
> ---
> branch: https://github.com/tarantool/tarantool/tree/fix-recover-missing-xlog-test
> test/replication/recover_missing_xlog.result | 5 ++++-
> test/replication/recover_missing_xlog.test.lua | 3 ++-
> 2 files changed, 6 insertions(+), 2 deletions(-)
Pushed.
--
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-05-19 20:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-18 17:01 [tarantool-patches] [PATCH] replication: stability fix for test recover_missing_xlog Konstantin Belyavskiy
2018-05-19 20:49 ` [tarantool-patches] " Konstantin Osipov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox