X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-akka-raft%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fraft%2FMigratedMessagesTest.java;h=276ffb27f4f8a5faf0e206c2cdedbc807fa12fb2;hb=88a7f904602133bb803752848bb58c9b0a3e9792;hp=0b58c8927dcdc8373d21b65875ca15dd83003b41;hpb=90735c91ce3390a731afc446b4e7314c544ab9d6;p=controller.git diff --git a/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/MigratedMessagesTest.java b/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/MigratedMessagesTest.java index 0b58c8927d..276ffb27f4 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/MigratedMessagesTest.java +++ b/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/MigratedMessagesTest.java @@ -12,12 +12,12 @@ import static org.junit.Assert.assertEquals; import akka.actor.ActorRef; import akka.dispatch.Dispatchers; import akka.testkit.TestActorRef; -import com.google.common.base.Optional; import com.google.common.collect.ImmutableMap; import com.google.common.io.ByteSource; import com.google.common.util.concurrent.Uninterruptibles; import java.io.OutputStream; import java.util.List; +import java.util.Optional; import java.util.concurrent.TimeUnit; import java.util.function.Consumer; import org.junit.After; @@ -52,7 +52,7 @@ public class MigratedMessagesTest extends AbstractActorTest { } @After - public void tearDown() throws Exception { + public void tearDown() { factory.close(); InMemoryJournal.clear(); InMemorySnapshotStore.clear(); @@ -72,16 +72,16 @@ public class MigratedMessagesTest extends AbstractActorTest { RaftActorSnapshotCohort snapshotCohort = new RaftActorSnapshotCohort() { @Override - public void createSnapshot(ActorRef actorRef, java.util.Optional installSnapshotStream) { + public void createSnapshot(final ActorRef actorRef, final Optional installSnapshotStream) { actorRef.tell(new CaptureSnapshotReply(ByteState.empty(), installSnapshotStream), actorRef); } @Override - public void applySnapshot(Snapshot.State snapshotState) { + public void applySnapshot(final Snapshot.State snapshotState) { } @Override - public State deserializeSnapshot(ByteSource snapshotBytes) { + public State deserializeSnapshot(final ByteSource snapshotBytes) { throw new UnsupportedOperationException(); } }; @@ -102,8 +102,8 @@ public class MigratedMessagesTest extends AbstractActorTest { } @SuppressWarnings("checkstyle:IllegalCatch") - private TestActorRef doTestSnapshotAfterStartupWithMigratedMessage(String id, boolean persistent, - Consumer snapshotVerifier, final State snapshotState) { + private TestActorRef doTestSnapshotAfterStartupWithMigratedMessage(final String id, + final boolean persistent, final Consumer snapshotVerifier, final State snapshotState) { InMemorySnapshotStore.addSnapshotSavedLatch(id); InMemoryJournal.addDeleteMessagesCompleteLatch(id); DefaultConfigParamsImpl config = new DefaultConfigParamsImpl(); @@ -111,16 +111,16 @@ public class MigratedMessagesTest extends AbstractActorTest { RaftActorSnapshotCohort snapshotCohort = new RaftActorSnapshotCohort() { @Override - public void createSnapshot(ActorRef actorRef, java.util.Optional installSnapshotStream) { + public void createSnapshot(final ActorRef actorRef, final Optional installSnapshotStream) { actorRef.tell(new CaptureSnapshotReply(snapshotState, installSnapshotStream), actorRef); } @Override - public void applySnapshot(State newState) { + public void applySnapshot(final State newState) { } @Override - public State deserializeSnapshot(ByteSource snapshotBytes) { + public State deserializeSnapshot(final ByteSource snapshotBytes) { throw new UnsupportedOperationException(); } };