From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id E8F52259E6 for ; Fri, 18 May 2018 13:01:51 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id j6Nvjxv-1H24 for ; Fri, 18 May 2018 13:01:51 -0400 (EDT) Received: from smtp37.i.mail.ru (smtp37.i.mail.ru [94.100.177.97]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 629EE2583B for ; Fri, 18 May 2018 13:01:51 -0400 (EDT) From: Konstantin Belyavskiy Subject: [tarantool-patches] [PATCH] replication: stability fix for test recover_missing_xlog Date: Fri, 18 May 2018 20:01:49 +0300 Message-Id: <20180518170149.24412-1-k.belyavskiy@tarantool.org> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: georgy@tarantool.org Cc: tarantool-patches@freelists.org 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)