Fix intermittent RaftActorTest failures
I've seen the following test failure on jenkins several times:
RaftActorTest.testRealSnapshotWhenReplicatedToAllIndexNotInReplicatedLog:838
expected:<Leader> but was:<Candidate>
This is a result of the short-circuiting of the election timeout scheduling
when there are no peers so it goes from from Follower -> Candidate -> Leader
quickly. The test artificially sets the behavior to Leader but the immediate
ElectionTimeout messages may cause it to switch back to Candidate and
cause assertion failures before the test completes. This didn't happen
before b/c it sets the heartbeat interval really high. To alleviate the
failures, I set a peer to elide the short-circuiting.
Change-Id: I2c086f214baefb826beb898dfe4b11b659cd1eaa
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
(cherry picked from commit
2f2dd5376f885a160d3204a407f24e174375a5a5)