consensus-raft/src/test/java/com/mboysan/consensus/RaftNodeTest.java
/**
     * Tests the failure of an append log entry event when the leader is killed/disconnected and there was no time
     * to elect a new one.
     */
Tests the failure of an append log entry event when the leader is killed/disconnected and there was no time
to elect a new one.
Tests the failure of an append log entry event when the leader is killed / disconnected and there was no time to elect a new one .
@Test
    void testWhenLeaderDisconnectedThenAppendFails() throws Exception {
        int numServers = 3;
        init(numServers);
        int leaderId = assertOneLeader();
        disconnect(leaderId);
        assertFalse(getNode((leaderId + 1) % numServers).append("some-command").get());
    }
@ Test void testWhenLeaderDisconnectedThenAppendFails ( ) throws Exception { int numServers = 3 ; init ( numServers ) ; int leaderId = assertOneLeader ( ) ; disconnect ( leaderId ) ; assertFalse ( getNode ( ( leaderId + 1 ) % numServers ) . append ( "some-command" ) . get ( ) ) ; }
Tests the failure of an append log entry event when the leader is killed/disconnected and there was no time
 to elect a new one.
Tests the failure of an append log entry event when the leader is killed / disconnected and there was no time to elect a new one .