Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions server/test/com/cloud/ha/HighAvailabilityManagerImplTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.apache.cloudstack.engine.orchestration.service.VolumeOrchestrationService;
import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
import org.apache.cloudstack.managed.context.ManagedContext;
import org.apache.log4j.Logger;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
Expand Down Expand Up @@ -70,6 +71,7 @@

@RunWith(MockitoJUnitRunner.class)
public class HighAvailabilityManagerImplTest {
private static final Logger s_logger = Logger.getLogger(HighAvailabilityManagerImplTest.class);
@Mock
HighAvailabilityDao _haDao;
@Mock
Expand Down Expand Up @@ -121,6 +123,7 @@ public static void initOnce() {
processWorkMethod = HighAvailabilityManagerImpl.class.getDeclaredMethod("processWork", HaWorkVO.class);
processWorkMethod.setAccessible(true);
} catch (NoSuchMethodException e) {
s_logger.info("[ignored] expected NoSuchMethodException caught: " + e.getLocalizedMessage());
}
}

Expand Down Expand Up @@ -230,8 +233,11 @@ private void processWorkWithRetryCount(int count, Step expectedStep) {
try {
processWorkMethod.invoke(highAvailabilityManagerSpy, work);
} catch (IllegalAccessException e) {
s_logger.info("[ignored] expected IllegalAccessException caught: " + e.getLocalizedMessage());
} catch (IllegalArgumentException e) {
s_logger.info("[ignored] expected IllegalArgumentException caught: " + e.getLocalizedMessage());
} catch (InvocationTargetException e) {
s_logger.info("[ignored] expected InvocationTargetException caught: " + e.getLocalizedMessage());
}
assertTrue(work.getStep() == expectedStep);
}
Expand Down