diff options
Diffstat (limited to 'nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/notification/TestLifecycleChangeNotificationManager.java')
-rw-r--r-- | nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/notification/TestLifecycleChangeNotificationManager.java | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/notification/TestLifecycleChangeNotificationManager.java b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/notification/TestLifecycleChangeNotificationManager.java index bf85dedd..dc1b8ddf 100644 --- a/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/notification/TestLifecycleChangeNotificationManager.java +++ b/nokiav2/driver/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nokia/vnfm/notification/TestLifecycleChangeNotificationManager.java @@ -294,10 +294,10 @@ public class TestLifecycleChangeNotificationManager extends TestBase { } /** - * if unable to send LCN to VF-C the error is propagated + * if unable to query all operation executions from CBAM the error is propagated */ @Test - public void testUnableToQueryCurrentOperation() throws Exception { + public void testUnableToQueryCurrentOperations() throws Exception { recievedLcn.setOperation(OperationType.TERMINATE); recievedLcn.setStatus(OperationStatus.FINISHED); RuntimeException expectedException = new RuntimeException(); @@ -314,6 +314,26 @@ public class TestLifecycleChangeNotificationManager extends TestBase { } /** + * if unable to query the given operation execution from CBAM the error is propagated + */ + @Test + public void testUnableToQueryCurrentOperation() throws Exception { + recievedLcn.setOperation(OperationType.TERMINATE); + recievedLcn.setStatus(OperationStatus.FINISHED); + RuntimeException expectedException = new RuntimeException(); + when(operationExecutionApi.operationExecutionsOperationExecutionIdGet(recievedLcn.getLifecycleOperationOccurrenceId(), NOKIA_LCM_API_VERSION)).thenThrow(expectedException); + //when + try { + lifecycleChangeNotificationManager.handleLcn(recievedLcn); + fail(); + } catch (Exception e) { + //verify + assertEquals(expectedException, e.getCause()); + verify(logger).error("Unable to retrieve the operation execution with instantiationOperationExecutionId identifier", e.getCause()); + } + } + + /** * test that waitForTerminationToBeProcessed outwaits the successfull processing of the termination notification */ @Test |