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 38E3A24545 for ; Wed, 3 Jul 2019 19:31:09 -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 PNbGDPK9E5pb for ; Wed, 3 Jul 2019 19:31:09 -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 E9EB921318 for ; Wed, 3 Jul 2019 19:31:08 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v2 2/2] swim: be suspicious when add new member References: <20190703190738.GC17318@atlas> From: Vladislav Shpilevoy Message-ID: Date: Thu, 4 Jul 2019 01:32:10 +0200 MIME-Version: 1.0 In-Reply-To: <20190703190738.GC17318@atlas> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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: Konstantin Osipov Cc: tarantool-patches@freelists.org Thanks for the review! Since the previous commit now does not break the tests, I've removed from this one all the test fixes, but added a new test: > static void > swim_test_suspect_new_members(void) > { > swim_start_test(2); > > struct swim_cluster *cluster = swim_cluster_new(3); > swim_cluster_set_ack_timeout(cluster, 1); > swim_cluster_interconnect(cluster, 0, 1); > swim_cluster_interconnect(cluster, 1, 2); > > swim_cluster_set_drop(cluster, 0, 100); > swim_cluster_block_io(cluster, 2); > is(swim_cluster_wait_status(cluster, 1, 0, swim_member_status_MAX, 15), > 0, "S2 dropped S1 as dead"); > swim_cluster_unblock_io(cluster, 2); > swim_run_for(1); > is(swim_cluster_member_status(cluster, 2, 0), swim_member_status_MAX, > "S3 didn't add S1 from S2's messages, because S1 didn't answer "\ > "on a ping"); > > swim_cluster_delete(cluster); > > swim_finish_test(); > }