@Test public void testRaftActorRecoveryWithPersistenceDisabled() { String persistenceId = factory.generateActorId("follower-"); DefaultConfigParamsImpl config = new DefaultConfigParamsImpl(); config.setHeartBeatInterval(new FiniteDuration(1, TimeUnit.DAYS)); TestActorRef<MockRaftActor> ref = factory.createTestActor(MockRaftActor.props(persistenceId, ImmutableMap.<String, String>builder().put("member1", "address").build(), config, createProvider()), persistenceId); MockRaftActor mockRaftActor = ref.underlyingActor(); mockRaftActor.waitForRecoveryComplete(); mockRaftActor.waitForInitializeBehaviorComplete(); assertEquals("getRaftState", RaftState.Follower, mockRaftActor.getRaftState()); }
@VisibleForTesting protected final RaftState getRaftState() { return getCurrentBehavior().state(); }
RaftActor extends AbstractUntypedPersistentActor { @VisibleForTesting protected final RaftState getRaftState() { return getCurrentBehavior().state(); } }
RaftActor extends AbstractUntypedPersistentActor { @VisibleForTesting protected final RaftState getRaftState() { return getCurrentBehavior().state(); } protected  RaftActor(final String id, final Map<String, String> peerAddresses,
         final Optional<ConfigParams> configParams, final short payloadVersion); }
RaftActor extends AbstractUntypedPersistentActor { @VisibleForTesting protected final RaftState getRaftState() { return getCurrentBehavior().state(); } protected  RaftActor(final String id, final Map<String, String> peerAddresses,
         final Optional<ConfigParams> configParams, final short payloadVersion); @Override void preStart(); @Override void postStop(); @Override long snapshotSequenceNr(); ActorSelection getLeader(); final DataPersistenceProvider persistence(); void setPersistence(final DataPersistenceProvider provider); }
RaftActor extends AbstractUntypedPersistentActor { @VisibleForTesting protected final RaftState getRaftState() { return getCurrentBehavior().state(); } protected  RaftActor(final String id, final Map<String, String> peerAddresses,
         final Optional<ConfigParams> configParams, final short payloadVersion); @Override void preStart(); @Override void postStop(); @Override long snapshotSequenceNr(); ActorSelection getLeader(); final DataPersistenceProvider persistence(); void setPersistence(final DataPersistenceProvider provider);  }