[tarantool-patches] Re: [PATCH v2 2/2] swim: be suspicious when add new member

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Thu Jul 4 02:32:10 MSK 2019


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();
> }




More information about the Tarantool-patches mailing list