@SuppressWarnings({ "unchecked", "rawtypes" })
@Test
- public void testCaptureToInstall() throws Exception {
+ public void testCaptureToInstall() {
// Force capturing toInstall = true
snapshotManager.captureToInstall(new SimpleReplicatedLogEntry(0, 1,
@SuppressWarnings({ "rawtypes", "unchecked" })
@Test
- public void testCapture() throws Exception {
+ public void testCapture() {
boolean capture = snapshotManager.capture(new SimpleReplicatedLogEntry(9, 1,
new MockRaftActorContext.MockPayload()), 9);
@SuppressWarnings({ "unchecked", "rawtypes" })
@Test
- public void testCaptureWithNullLastLogEntry() throws Exception {
+ public void testCaptureWithNullLastLogEntry() {
boolean capture = snapshotManager.capture(null, 1);
assertTrue(capture);
}
@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,
@SuppressWarnings("unchecked")
@Test
- public void testIllegalCapture() throws Exception {
+ public void testIllegalCapture() {
boolean capture = snapshotManager.capture(new SimpleReplicatedLogEntry(9, 1,
new MockRaftActorContext.MockPayload()), 9);
}
@Test
- public void testPersistWhenReplicatedToAllIndexMinusOne() throws Exception {
+ public void testPersistWhenReplicatedToAllIndexMinusOne() {
doReturn(7L).when(mockReplicatedLog).getSnapshotIndex();
doReturn(1L).when(mockReplicatedLog).getSnapshotTerm();
}
@Test
- public void testPersistWhenReplicatedToAllIndexNotMinus() throws Exception {
+ public void testPersistWhenReplicatedToAllIndexNotMinus() {
doReturn(45L).when(mockReplicatedLog).getSnapshotIndex();
doReturn(6L).when(mockReplicatedLog).getSnapshotTerm();
ReplicatedLogEntry replicatedLogEntry = mock(ReplicatedLogEntry.class);