diff options
author | PATTANAYAK, SAUMYA SWARUP (sp931a) <sp931a@att.com> | 2020-09-22 17:33:23 -0400 |
---|---|---|
committer | PATTANAYAK, SAUMYA SWARUP (sp931a) <sp931a@att.com> | 2020-09-22 17:33:29 -0400 |
commit | 40027d2cbfee31ecfec1c8a4189668f2c46c82ce (patch) | |
tree | 7e3a46a64f6a5a240065233272747d308a02a095 /vid-automation/src/test/java/org/onap | |
parent | b2793df9df1b3fde4dab0f7d037f4eff67324c1f (diff) |
When VG instantiation fails the root job status should be in final state
Issue-ID: VID-902
Change-Id: Ic40cf857e58e7079be9b23f7ae540399ec8fa227
Signed-off-by: PATTANAYAK, SAUMYA SWARUP (sp931a) <sp931a@att.com>
Diffstat (limited to 'vid-automation/src/test/java/org/onap')
-rw-r--r-- | vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest.java | 65 | ||||
-rw-r--r-- | vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest3.java | 7 |
2 files changed, 43 insertions, 29 deletions
diff --git a/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest.java index c032d5fed..1ff5f42d6 100644 --- a/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest.java +++ b/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest.java @@ -303,6 +303,13 @@ public class AsyncInstantiationALaCarteApiTest extends AsyncInstantiationBase { registerExpectationFromPresets(presets, RegistrationStrategy.CLEAR_THEN_SET); final List<String> uuids = createBulkOfInstances(false, 1, ImmutableMap.of(), DELETE_TWO_VNF_GROUPS_MEMBER_AND_ADD_ONE_REQUEST); + //Temporary sleep, as sometime the simulator behaves unexpected + try { + Thread.sleep(20000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + assertThat(uuids, hasSize(1)); final String jobId = uuids.get(0); @@ -424,35 +431,35 @@ public class AsyncInstantiationALaCarteApiTest extends AsyncInstantiationBase { if(isAsyncAlacarteVfModuleWithPauseOnFailure) { return new Object[][] { - {"none", ImmutableMap.of("vfModules", 3L), emptyMap() , true}, - {"none", ImmutableMap.of("vfModules", 3L), emptyMap() , false}, - {"instance", - ImmutableMap.of("vnfs", 0L, "networks", 0L, "vfModules", 0L, "volumeGroups", 0L), - ImmutableMap.of("serviceInstances", 1L, "vnfs", 1L, "networks", 1L, "vfModules", 3L, "volumeGroups", 1L), - true}, - {"network", - ImmutableMap.of("vnfs", 1L, "networks", 1L, "vfModules", 3L, "volumeGroups", 1L, "serviceInstances", 1L), - ImmutableMap.of("networks", 1L), - true}, - {"vnf0", - ImmutableMap.of("vfModules", 0L, "volumeGroups", 0L), - ImmutableMap.of("vnfs", 1L, "vfModules", 3L, "volumeGroups", 1L), - true}, - {"vfModule0", ImmutableMap.of("vfModules", 1L, "volumeGroups", 0L), - ImmutableMap.of("vfModules", 3L, "volumeGroups", 1L), - true}, -// {"volumeGroup", -// ImmutableMap.of("vnfs", 1L, "networks", 1L, "vfModules", 1L, "volumeGroups", 1L, "serviceInstances", 1L), -// ImmutableMap.of("vfModules", 1L, "volumeGroups", 1L), -// true}, - {"vfModule1", - ImmutableMap.of("vfModules", 2L, "volumeGroups", 1L) , - ImmutableMap.of("vfModules", 2L, "volumeGroups", 1L) , - true}, - {"vfModule2", - ImmutableMap.of("vfModules", 3L, "volumeGroups", 1L), - ImmutableMap.of("vfModules", 1L, "volumeGroups", 0L), - true } + {"none", ImmutableMap.of("vfModules", 3L), emptyMap() , true}, + {"none", ImmutableMap.of("vfModules", 3L), emptyMap() , false}, + {"instance", + ImmutableMap.of("vnfs", 0L, "networks", 0L, "vfModules", 0L, "volumeGroups", 0L), + ImmutableMap.of("serviceInstances", 1L, "vnfs", 1L, "networks", 1L, "vfModules", 3L, "volumeGroups", 1L), + true}, + {"network", + ImmutableMap.of("serviceInstances", 1L,"networks", 1L,"vnfs", 0L, "vfModules", 0L, "volumeGroups", 0L ), + ImmutableMap.of("networks", 1L, "vnfs", 1L,"vfModules", 3L, "volumeGroups", 1L), + true}, + {"vnf0", + ImmutableMap.of("vfModules", 0L, "volumeGroups", 0L), + ImmutableMap.of("vnfs", 1L, "vfModules", 3L, "volumeGroups", 1L), + true}, + {"vfModule0", ImmutableMap.of("vfModules", 1L, "volumeGroups", 0L), + ImmutableMap.of("vfModules", 3L, "volumeGroups", 1L), + true}, + {"volumeGroup", + ImmutableMap.of("vnfs", 1L, "networks", 1L, "vfModules", 1L, "volumeGroups", 1L, "serviceInstances", 1L), + ImmutableMap.of("vfModules", 2L, "volumeGroups", 1L), + true}, + {"vfModule1", + ImmutableMap.of("vfModules", 2L, "volumeGroups", 1L) , + ImmutableMap.of("vfModules", 2L, "volumeGroups", 1L) , + true}, + {"vfModule2", + ImmutableMap.of("vfModules", 3L, "volumeGroups", 1L), + ImmutableMap.of("vfModules", 1L, "volumeGroups", 0L), + true } }; } else if (Features.FLAG_ASYNC_ALACARTE_VFMODULE.isActive()) { return new Object[][]{ diff --git a/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest3.java b/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest3.java index 2e21653d0..b6b90a194 100644 --- a/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest3.java +++ b/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest3.java @@ -234,6 +234,13 @@ public class AsyncInstantiationALaCarteApiTest3 extends AsyncInstantiationBase { RELATED_VNF2_ACTION, "None_Delete" ), PAYLOAD_TEMPLATE_1_VNF_GROUP_WITH_3_MEMBERS_REQUEST); + //Temporary sleep, as sometime the simulator behaves unexpected + try { + Thread.sleep(20000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + assertThat(uuids, hasSize(1)); final String jobId = uuids.get(0); |