X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-akka-raft%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fraft%2Fbehaviors%2FPartitionedCandidateOnStartupElectionScenarioTest.java;h=f8eab9a38b3839dc3f91a10d1b989ad3ff12ccc7;hp=9d58d03237c6f7b63bb1d32dc6e3008b84f8ecb7;hb=fe8352361d49c76a0ecc80162a2b8258d35198b5;hpb=e1eca73a5ae2ffae8dd78c6fe5281cd2f45d5ef3 diff --git a/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/behaviors/PartitionedCandidateOnStartupElectionScenarioTest.java b/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/behaviors/PartitionedCandidateOnStartupElectionScenarioTest.java index 9d58d03237..f8eab9a38b 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/behaviors/PartitionedCandidateOnStartupElectionScenarioTest.java +++ b/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/behaviors/PartitionedCandidateOnStartupElectionScenarioTest.java @@ -14,13 +14,13 @@ import com.google.common.collect.ImmutableMap; import org.junit.Test; import org.opendaylight.controller.cluster.raft.DefaultConfigParamsImpl; import org.opendaylight.controller.cluster.raft.MockRaftActorContext.MockPayload; -import org.opendaylight.controller.cluster.raft.MockRaftActorContext.MockReplicatedLogEntry; import org.opendaylight.controller.cluster.raft.MockRaftActorContext.SimpleReplicatedLog; import org.opendaylight.controller.cluster.raft.RaftState; import org.opendaylight.controller.cluster.raft.base.messages.ElectionTimeout; import org.opendaylight.controller.cluster.raft.base.messages.TimeoutNow; import org.opendaylight.controller.cluster.raft.messages.RequestVote; import org.opendaylight.controller.cluster.raft.messages.RequestVoteReply; +import org.opendaylight.controller.cluster.raft.persisted.SimpleReplicatedLogEntry; /** * A leader election scenario test that partitions a candidate when trying to join a cluster on startup. @@ -166,7 +166,7 @@ public class PartitionedCandidateOnStartupElectionScenarioTest extends AbstractL // will be 2 and the last term will be 1 so it is behind the leader's log. SimpleReplicatedLog candidateReplicatedLog = new SimpleReplicatedLog(); - candidateReplicatedLog.append(new MockReplicatedLogEntry(2, 0, new MockPayload(""))); + candidateReplicatedLog.append(new SimpleReplicatedLogEntry(0, 2, new MockPayload(""))); member3Context.setReplicatedLog(candidateReplicatedLog); member3Context.setCommitIndex(candidateReplicatedLog.lastIndex()); @@ -216,8 +216,8 @@ public class PartitionedCandidateOnStartupElectionScenarioTest extends AbstractL // will be 3 and the last term will be 2. SimpleReplicatedLog replicatedLog = new SimpleReplicatedLog(); - replicatedLog.append(new MockReplicatedLogEntry(2, 0, new MockPayload(""))); - replicatedLog.append(new MockReplicatedLogEntry(3, 1, new MockPayload(""))); + replicatedLog.append(new SimpleReplicatedLogEntry(0, 2, new MockPayload(""))); + replicatedLog.append(new SimpleReplicatedLogEntry(1, 3, new MockPayload(""))); // Create member 2's behavior as Follower.