Search in sources :

Example 16 with FollowerInitialSyncUpStatus

use of org.opendaylight.controller.cluster.raft.base.messages.FollowerInitialSyncUpStatus in project controller by opendaylight.

the class ShardTest method testFollowerInitialSyncStatus.

@Test
public void testFollowerInitialSyncStatus() throws Exception {
    final TestActorRef<Shard> shard = actorFactory.createTestActor(newShardProps().withDispatcher(Dispatchers.DefaultDispatcherId()), "testFollowerInitialSyncStatus");
    shard.underlyingActor().handleNonRaftCommand(new FollowerInitialSyncUpStatus(false, "member-1-shard-inventory-operational"));
    assertEquals(false, shard.underlyingActor().getShardMBean().getFollowerInitialSyncStatus());
    shard.underlyingActor().handleNonRaftCommand(new FollowerInitialSyncUpStatus(true, "member-1-shard-inventory-operational"));
    assertEquals(true, shard.underlyingActor().getShardMBean().getFollowerInitialSyncStatus());
}
Also used : FollowerInitialSyncUpStatus(org.opendaylight.controller.cluster.raft.base.messages.FollowerInitialSyncUpStatus) Test(org.junit.Test)

Aggregations

FollowerInitialSyncUpStatus (org.opendaylight.controller.cluster.raft.base.messages.FollowerInitialSyncUpStatus)16 Test (org.junit.Test)14 MockRaftActorContext (org.opendaylight.controller.cluster.raft.MockRaftActorContext)9 ReplicatedLogEntry (org.opendaylight.controller.cluster.raft.ReplicatedLogEntry)9 AppendEntries (org.opendaylight.controller.cluster.raft.messages.AppendEntries)9 SimpleReplicatedLogEntry (org.opendaylight.controller.cluster.raft.persisted.SimpleReplicatedLogEntry)9 AppendEntriesReply (org.opendaylight.controller.cluster.raft.messages.AppendEntriesReply)5 AddressFromURIString (akka.actor.AddressFromURIString)3 AbstractShardManagerTest (org.opendaylight.controller.cluster.datastore.AbstractShardManagerTest)3 RoleChangeNotification (org.opendaylight.controller.cluster.notifications.RoleChangeNotification)3 ByteString (com.google.protobuf.ByteString)1 ConnectClientRequest (org.opendaylight.controller.cluster.access.commands.ConnectClientRequest)1 MemberName (org.opendaylight.controller.cluster.access.concepts.MemberName)1 RequestEnvelope (org.opendaylight.controller.cluster.access.concepts.RequestEnvelope)1 TransactionIdentifier (org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier)1 MessageTracker (org.opendaylight.controller.cluster.common.actor.MessageTracker)1 Error (org.opendaylight.controller.cluster.common.actor.MessageTracker.Error)1 BatchedModifications (org.opendaylight.controller.cluster.datastore.messages.BatchedModifications)1 ForwardedReadyTransaction (org.opendaylight.controller.cluster.datastore.messages.ForwardedReadyTransaction)1 GetShardDataTree (org.opendaylight.controller.cluster.datastore.messages.GetShardDataTree)1