|
33 | 33 | import org.apache.cloudstack.engine.orchestration.service.VolumeOrchestrationService; |
34 | 34 | import org.apache.cloudstack.framework.config.dao.ConfigurationDao; |
35 | 35 | import org.apache.cloudstack.managed.context.ManagedContext; |
| 36 | +import org.apache.log4j.Logger; |
36 | 37 | import org.junit.Before; |
37 | 38 | import org.junit.BeforeClass; |
38 | 39 | import org.junit.Test; |
|
70 | 71 |
|
71 | 72 | @RunWith(MockitoJUnitRunner.class) |
72 | 73 | public class HighAvailabilityManagerImplTest { |
| 74 | + private static final Logger s_logger = Logger.getLogger(HighAvailabilityManagerImplTest.class); |
73 | 75 | @Mock |
74 | 76 | HighAvailabilityDao _haDao; |
75 | 77 | @Mock |
@@ -121,6 +123,7 @@ public static void initOnce() { |
121 | 123 | processWorkMethod = HighAvailabilityManagerImpl.class.getDeclaredMethod("processWork", HaWorkVO.class); |
122 | 124 | processWorkMethod.setAccessible(true); |
123 | 125 | } catch (NoSuchMethodException e) { |
| 126 | + s_logger.info("[ignored] expected NoSuchMethodException caught: " + e.getLocalizedMessage()); |
124 | 127 | } |
125 | 128 | } |
126 | 129 |
|
@@ -230,8 +233,11 @@ private void processWorkWithRetryCount(int count, Step expectedStep) { |
230 | 233 | try { |
231 | 234 | processWorkMethod.invoke(highAvailabilityManagerSpy, work); |
232 | 235 | } catch (IllegalAccessException e) { |
| 236 | + s_logger.info("[ignored] expected IllegalAccessException caught: " + e.getLocalizedMessage()); |
233 | 237 | } catch (IllegalArgumentException e) { |
| 238 | + s_logger.info("[ignored] expected IllegalArgumentException caught: " + e.getLocalizedMessage()); |
234 | 239 | } catch (InvocationTargetException e) { |
| 240 | + s_logger.info("[ignored] expected InvocationTargetException caught: " + e.getLocalizedMessage()); |
235 | 241 | } |
236 | 242 | assertTrue(work.getStep() == expectedStep); |
237 | 243 | } |
|
0 commit comments