From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 72E9A45C304 for ; Sun, 13 Dec 2020 20:15:33 +0300 (MSK) From: Vladislav Shpilevoy Date: Sun, 13 Dec 2020 18:15:22 +0100 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 0/8] Raft module, part 4 - unit tests List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org, sergepetrenko@tarantool.org The patchset is a fourth part of Raft relocation to a new module for the sake of unit testing. This part implements the tests and finishes the task. Branch: http://github.com/tarantool/tarantool/tree/gerold103/gh-5303-p4-raft-tests Issue: https://github.com/tarantool/tarantool/issues/5303 Vladislav Shpilevoy (8): fakesys: fix ev_is_active not working on fake timers fakesys: introduce fakeev_timer_remaining() raft: introduce raft_ev test: introduce raft unit tests raft: fix crash when received 0 term message raft: fix ignorance of bad state receipt raft: fix crash on election timeout decrease raft: fix crash on death timeout decrease src/lib/fakesys/fakeev.c | 14 + src/lib/fakesys/fakeev.h | 4 + src/lib/raft/CMakeLists.txt | 8 + src/lib/raft/raft.c | 74 ++- src/lib/raft/raft.h | 1 + src/lib/raft/raft_ev.c | 57 ++ src/lib/raft/raft_ev.h | 57 ++ test/unit/CMakeLists.txt | 3 + test/unit/raft.c | 1255 +++++++++++++++++++++++++++++++++++ test/unit/raft.result | 217 ++++++ test/unit/raft_test_utils.c | 557 ++++++++++++++++ test/unit/raft_test_utils.h | 287 ++++++++ 12 files changed, 2500 insertions(+), 34 deletions(-) create mode 100644 src/lib/raft/raft_ev.c create mode 100644 src/lib/raft/raft_ev.h create mode 100644 test/unit/raft.c create mode 100644 test/unit/raft.result create mode 100644 test/unit/raft_test_utils.c create mode 100644 test/unit/raft_test_utils.h -- 2.24.3 (Apple Git-128)