summaryrefslogtreecommitdiffstats
path: root/vid-automation/src/main/java/org
diff options
context:
space:
mode:
authorEylon Malin <eylon.malin@intl.att.com>2020-01-15 10:06:18 +0200
committerEylon Malin <eylon.malin@intl.att.com>2020-01-15 16:33:19 +0200
commite3fd03a98925c66cb6d580be8591602ecceb52f9 (patch)
tree4b45aac61e118258dc939a940f1aef187321e716 /vid-automation/src/main/java/org
parent6876eba3d0b43b01eb303a0d530fe45712f33d74 (diff)
e2e test for instantiation template
Issue-ID: VID-724 Change-Id: I7bac1c2789a57698224be7f42329894c5f02b150 Signed-off-by: Eylon Malin <eylon.malin@intl.att.com>
Diffstat (limited to 'vid-automation/src/main/java/org')
-rw-r--r--vid-automation/src/main/java/org/onap/vid/api/AsyncInstantiationBase.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/vid-automation/src/main/java/org/onap/vid/api/AsyncInstantiationBase.java b/vid-automation/src/main/java/org/onap/vid/api/AsyncInstantiationBase.java
index 8855b51f0..66cdee374 100644
--- a/vid-automation/src/main/java/org/onap/vid/api/AsyncInstantiationBase.java
+++ b/vid-automation/src/main/java/org/onap/vid/api/AsyncInstantiationBase.java
@@ -305,15 +305,19 @@ public class AsyncInstantiationBase extends BaseMsoApiTest {
final List<String> jobIds = createBulkOfMacroInstances(presets, false, bulkSize, names);
Assert.assertEquals(jobIds.size(),bulkSize);
+ waitForJobsToSuccessfullyCompleted(bulkSize, jobIds);
+ return jobIds;
+ }
+
+ public void waitForJobsToSuccessfullyCompleted(int bulkSize, List<String> jobIds) {
assertTrue(String.format("Not all services with ids: %s are in state completed after 30 sec",
jobIds.stream().collect(joining(","))),
Wait.waitFor(y-> serviceListCall().getBody().stream()
.filter(si -> jobIds.contains(si.jobId))
- .filter(si -> si.jobStatus==JobStatus.COMPLETED)
+ .filter(si -> si.jobStatus== JobStatus.COMPLETED)
.count() == bulkSize,
null, 30, 1 ));
- return jobIds;
}
protected List<JobAuditStatus> getJobMsoAuditStatusForAlaCarte(String jobUUID, String requestId, String serviceInstanceId){