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%2FSnapshotManagerTest.java;h=44f8f8041f86f2d7c9ec1bbde52cede5bfa9d7da;hp=ccbdb5531faaf9f6bd6bd3a4662ee122d3f0db33;hb=12fcdfe39aa26dcba7fd3bb4d4c68e3d02e65c51;hpb=3564341bbc0a9b53c5a26becb3d03230125cba80 diff --git a/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/SnapshotManagerTest.java b/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/SnapshotManagerTest.java index ccbdb5531f..44f8f8041f 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/SnapshotManagerTest.java +++ b/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/SnapshotManagerTest.java @@ -120,7 +120,7 @@ public class SnapshotManagerTest extends AbstractActorTest { @SuppressWarnings({ "unchecked", "rawtypes" }) @Test - public void testCaptureToInstall() throws Exception { + public void testCaptureToInstall() { // Force capturing toInstall = true snapshotManager.captureToInstall(new SimpleReplicatedLogEntry(0, 1, @@ -150,7 +150,7 @@ public class SnapshotManagerTest extends AbstractActorTest { @SuppressWarnings({ "rawtypes", "unchecked" }) @Test - public void testCapture() throws Exception { + public void testCapture() { boolean capture = snapshotManager.capture(new SimpleReplicatedLogEntry(9, 1, new MockRaftActorContext.MockPayload()), 9); @@ -181,7 +181,7 @@ public class SnapshotManagerTest extends AbstractActorTest { @SuppressWarnings({ "unchecked", "rawtypes" }) @Test - public void testCaptureWithNullLastLogEntry() throws Exception { + public void testCaptureWithNullLastLogEntry() { boolean capture = snapshotManager.capture(null, 1); assertTrue(capture); @@ -209,7 +209,7 @@ public class SnapshotManagerTest extends AbstractActorTest { } @Test - public void testCaptureWithCreateProcedureError() throws Exception { + public void testCaptureWithCreateProcedureError() { doThrow(new RuntimeException("mock")).when(mockProcedure).accept(anyObject()); boolean capture = snapshotManager.capture(new SimpleReplicatedLogEntry(9, 1, @@ -224,7 +224,7 @@ public class SnapshotManagerTest extends AbstractActorTest { @SuppressWarnings("unchecked") @Test - public void testIllegalCapture() throws Exception { + public void testIllegalCapture() { boolean capture = snapshotManager.capture(new SimpleReplicatedLogEntry(9, 1, new MockRaftActorContext.MockPayload()), 9); @@ -244,7 +244,7 @@ public class SnapshotManagerTest extends AbstractActorTest { } @Test - public void testPersistWhenReplicatedToAllIndexMinusOne() throws Exception { + public void testPersistWhenReplicatedToAllIndexMinusOne() { doReturn(7L).when(mockReplicatedLog).getSnapshotIndex(); doReturn(1L).when(mockReplicatedLog).getSnapshotTerm(); @@ -284,7 +284,7 @@ public class SnapshotManagerTest extends AbstractActorTest { } @Test - public void testPersistWhenReplicatedToAllIndexNotMinus() throws Exception { + public void testPersistWhenReplicatedToAllIndexNotMinus() { doReturn(45L).when(mockReplicatedLog).getSnapshotIndex(); doReturn(6L).when(mockReplicatedLog).getSnapshotTerm(); ReplicatedLogEntry replicatedLogEntry = mock(ReplicatedLogEntry.class);