1 package org.openecomp.sdc.cucumber.steps;
3 import com.google.common.base.Strings;
4 import com.google.common.net.HttpHeaders;
5 import com.google.gson.JsonElement;
6 import com.google.gson.JsonParser;
7 import cucumber.api.java.After;
8 import cucumber.api.java.Before;
9 import cucumber.api.java.en.Given;
10 import cucumber.api.java.en.Then;
11 import cucumber.api.java.en.When;
12 import fj.data.Either;
13 import org.apache.commons.collections.CollectionUtils;
14 import org.apache.commons.lang3.StringUtils;
15 import org.apache.http.HttpStatus;
16 import org.apache.http.entity.ContentType;
17 import org.apache.http.entity.StringEntity;
18 import org.mockserver.integration.ClientAndServer;
19 import org.mockserver.model.Header;
20 import org.mockserver.model.HttpRequest;
21 import org.openecomp.sdc.api.IDistributionClient;
22 import org.openecomp.sdc.api.consumer.IConfiguration;
23 import org.openecomp.sdc.api.consumer.IFinalDistrStatusMessage;
24 import org.openecomp.sdc.api.consumer.INotificationCallback;
25 import org.openecomp.sdc.api.notification.IArtifactInfo;
26 import org.openecomp.sdc.api.notification.INotificationData;
27 import org.openecomp.sdc.api.results.IDistributionClientDownloadResult;
28 import org.openecomp.sdc.api.results.IDistributionClientResult;
29 import org.openecomp.sdc.be.dao.cassandra.CassandraOperationStatus;
30 import org.openecomp.sdc.be.dao.cassandra.OperationalEnvironmentDao;
31 import org.openecomp.sdc.be.datatypes.enums.EnvironmentStatusEnum;
32 import org.openecomp.sdc.be.resources.data.OperationalEnvironmentEntry;
33 import org.openecomp.sdc.common.datastructure.FunctionalInterfaces;
34 import org.openecomp.sdc.common.datastructure.Wrapper;
35 import org.openecomp.sdc.cucumber.spring.ImportTableConfig;
36 import org.openecomp.sdc.http.HttpAsdcClient;
37 import org.openecomp.sdc.http.HttpAsdcResponse;
38 import org.openecomp.sdc.http.IHttpAsdcClient;
39 import org.openecomp.sdc.impl.DistributionClientFactory;
40 import org.openecomp.sdc.utils.ArtifactTypeEnum;
41 import org.openecomp.sdc.utils.DistributionActionResultEnum;
42 import org.openecomp.sdc.utils.DistributionStatusEnum;
43 import org.springframework.context.annotation.AnnotationConfigApplicationContext;
46 import java.util.function.Function;
47 import java.util.stream.Collectors;
49 import static org.hamcrest.MatcherAssert.assertThat;
50 import static org.hamcrest.Matchers.is;
51 import static org.mockserver.model.HttpCallback.callback;
52 import static org.mockserver.model.HttpRequest.request;
53 import static org.mockserver.model.HttpResponse.response;
54 import static org.openecomp.sdc.common.datastructure.FunctionalInterfaces.retryMethodOnResult;
55 import static org.testng.Assert.assertEquals;
56 import static org.testng.Assert.assertNotNull;
58 //import org.openecomp.sdc.dmaap.DmaapPublisher;
60 public class StepsTenantIsolationCI {
62 private Map<String, OperationalEnvironmentEntry> recordMap = new HashMap<>();
63 private OperationalEnvironmentDao operationalEnvironmentDao;
64 private ClientAndServer aaiMockServer;
65 private ClientAndServer msoMockServer;
66 private List<IDistributionClient> distributionClients = new ArrayList<>();
68 private List<String> wdFinalStatusSent = new ArrayList<>();
70 private HttpRequest msoHttpRequest;
71 private List<String> uuidServicesList;
72 private boolean cleanFlag = true;
73 private int maxStepWaitTimeMs;
75 private List<String> envIds = new ArrayList<>();
76 private List<OperationalEnvironmentEntry> envList = new ArrayList<>();
77 private String asdcAddress;
78 private volatile int numberOfFinalDistributionsSentByASDC;
79 private int numOfArtifactsToDownload;
80 private volatile int totalNumOfArtifactsToDownload;
81 private List<String> envNames = new ArrayList<>(Arrays.asList("Apple", "Orange", "Grape", "Pear", "Watermelon", "Bannana", "Cherry", "Coconut", "Fig", "Mango", "Peach", "Pineapple", "Plum", "Strawberries", "Apricot"));
83 private static final String AAI_RESPONSE_BODY_FMT = "{\"operational-environment-id\":\"UUID of Operational Environment\","
84 + "\"operational-environment-name\":\"Op Env Name\"," + "\"operational-environment-type\":\"ECOMP\","
85 + "\"operational-environment-status\":\"Activate\"," + "\"tenant-context\":\"%s\","
86 + "\"workload-context\":\"%s\"," + "\"resource-version\":\"1505228226913\"," + "\"relationship-list\":{}}";
88 private static final String AAI_PATH_REGEX = "/aai/v12/cloud-infrastructure/operational-environments/.*";
90 private static final String MSO_PATH_REGEX = "/onap/mso/infra/modelDistributions/v1/distributions/.*";
93 public void beforeScenario() {
94 Collections.shuffle(envNames);
95 aaiMockServer = ClientAndServer.startClientAndServer(1111);
96 msoMockServer = ClientAndServer.startClientAndServer(1112);
98 this.operationalEnvironmentDao = createDaoObj();
102 public void afterScenario() {
103 System.out.println("Cleaning Up After Scenario...");
104 aaiMockServer.stop();
105 msoMockServer.stop();
107 envIds.stream().forEach(operationalEnvironmentDao::delete);
109 distributionClients.stream().forEach(IDistributionClient::stop);
110 System.out.println("Cleaning Up After Scenario Done");
113 // ############################# Given - Start #############################
115 @Given("^clean db after test is (.*)$")
116 public void clean_db_after_test_is(boolean cleanFlag) {
117 this.cleanFlag = cleanFlag;
120 @Given("^AAI returns (.*) and aai_body contains (.*) and (.*)$")
121 public void aai_returns(int retCode, String tenant, String workload) throws Throwable {
122 String aaiResponseBody = String.format(AAI_RESPONSE_BODY_FMT, tenant, workload);
124 setAaiMockServer(aaiResponseBody);
126 System.out.println(aaiMockServer.getClass());
129 @Given("^MSO-WD Simulators Started with topic name (.*)$")
130 public void notification_listner_simulators_started(String topicName) throws Throwable {
131 envList.forEach(env -> {
132 final IDistributionClient distClientSim = simulateDistributionClientWD(topicName, env);
133 distributionClients.add(distClientSim);
138 @Given("^MSO Final Distribution Simulator is UP$")
139 public void mso_Final_Distribution_Simulator_is_UP() throws Throwable {
140 msoHttpRequest = request().withPath(MSO_PATH_REGEX);
141 msoMockServer.when(msoHttpRequest).callback(
142 callback().withCallbackClass("org.openecomp.sdc.cucumber.steps.PrecannedTestExpectationCallback"));
145 @Given("^ASDC Address is (.*)$")
146 public void asdc_Address_is(String asdcAddress) throws Throwable {
147 this.asdcAddress = asdcAddress;
151 @Given("^ASDC Contains the following services (.*)$")
152 public void asdc_Contains_the_following_services(String listOfServicesUUID) throws Throwable {
153 uuidServicesList = Arrays.asList(listOfServicesUUID.split(",")).stream().map(String::trim)
154 .collect(Collectors.toList());
156 int maxMinWait = uuidServicesList.size() * envIds.size();
157 this.maxStepWaitTimeMs = 60000 * maxMinWait;
158 System.out.println(String.format("Set Max Step Wait Time To: %s Minutes", maxMinWait));
161 @Given("^The number of complete environments is (.*)$")
162 public void the_number_of_complete_environments_is(int envNum) throws Throwable {
165 while( envNum > envNames.size()){
166 envNames.add(String.valueOf(counter));
171 for (int i = 0; i < envNum; i++) {
172 OperationalEnvironmentEntry preSaveEntry = new OperationalEnvironmentEntry();
174 preSaveEntry.setStatus(EnvironmentStatusEnum.COMPLETED);
175 preSaveEntry.setLastModified(new Date(System.currentTimeMillis()));
177 Set<String> uebAdresses = new HashSet<>();
178 uebAdresses.add("uebsb92sfdc.it.att.com");
179 preSaveEntry.setDmaapUebAddress(uebAdresses);
180 preSaveEntry.setIsProduction(false);
181 preSaveEntry.setUebApikey("sSJc5qiBnKy2qrlc");
182 preSaveEntry.setUebSecretKey("4ZRPzNJfEUK0sSNBvccd2m7X");
183 preSaveEntry.setTenant("TEST");
184 preSaveEntry.setEcompWorkloadContext("ECOMP_E2E-IST");
186 // String envId = UUID.randomUUID().toString();
187 String envId = envNames.get(i);
188 preSaveEntry.setEnvironmentId(envId);
190 envList.add(preSaveEntry);
191 operationalEnvironmentDao.save(preSaveEntry);
195 @Given("^The number of artifacts each Simulator downloads from a service is (.*)$")
196 public void number_of_artifacts_each_simulator_downloads(int numOfArtifactsToDownload) throws Throwable {
197 this.numOfArtifactsToDownload = numOfArtifactsToDownload;
200 // ############################# Given - End #############################
202 // ############################# When - Start #############################
203 @When("^Distribution Requests are Sent By MSO$")
204 public void distribution_Requests_are_Sent_By_MSO() throws Throwable {
205 envList.stream().forEach(this::distributeServiceInEnv);
209 @When("^The Number Of Operational Envrinoments that created is (.*) and Records are added with data (.*)$")
210 public void operational_envrinoments_records_are_added_with_data(int numOfRecords, String recordData)
212 for (int i = 0; i < numOfRecords; i++) {
213 OperationalEnvironmentEntry preSaveEntry = new OperationalEnvironmentEntry();
214 JsonElement root = new JsonParser().parse(recordData);
216 String originalStatus = root.getAsJsonObject().get("status").getAsString();
217 int delta = root.getAsJsonObject().get("last_modified_delta").getAsInt();
218 preSaveEntry.setStatus(EnvironmentStatusEnum.getByName(originalStatus));
219 long last_modified = System.currentTimeMillis() + delta * 1000;
220 preSaveEntry.setLastModified(new Date(last_modified));
221 String envId = UUID.randomUUID().toString();
222 preSaveEntry.setEnvironmentId(envId);
224 // envrionmentIds.add(envId);
225 operationalEnvironmentDao.save(preSaveEntry);
231 // ############################# When - End #############################
233 // ############################# Then - Start #############################
234 @Then("^Operational Environment record contains tenant field (.*$)")
235 public void operational_environment_record_contains_tenant(boolean tenantExist) throws Throwable {
236 envIds.forEach(envId -> {
237 validateStringFieldPresent(tenantExist, OperationalEnvironmentEntry::getTenant, envId,
238 "Tenant is not as expected");
242 @Then("^Operational Environment record contains workload field (.*$)")
243 public void operational_environment_record_contains_workload(boolean workloadExist) throws Throwable {
244 envIds.forEach(envId -> {
245 validateStringFieldPresent(workloadExist, OperationalEnvironmentEntry::getEcompWorkloadContext, envId,
246 "Workload is not as expected");
250 @Then("^Operational Environment record contains UEB Address field (.*$)")
251 public void operational_environment_record_contains_ueb_address(boolean uebAddresExist) throws Throwable {
252 envIds.forEach(envId -> {
253 validateStringFieldPresent(uebAddresExist, this::convertUebAddressToList, envId,
254 "UEB Address is not as expected");
258 @Then("^The Number Of Environment is (.*) with status (.*)$")
259 public void the_Number_Of_Environment_Created_is(int numberOfEnvsCreated, String status) throws Throwable {
260 // Write code here that turns the phrase above into concrete actions
262 retryMethodOnResult(() -> getCurrentEnvironmets(status), envList -> envList.size() == numberOfEnvsCreated,
265 List<OperationalEnvironmentEntry> environmentsFound = getCurrentEnvironmets(status);
267 assertThat(environmentsFound.size(), is(numberOfEnvsCreated));
269 environmentsFound.forEach(env -> recordMap.put(env.getEnvironmentId(), env));
270 envList.addAll(environmentsFound);
273 @Then("^MSO Final Distribution Recieved Correct Number Of Request$")
274 public void mso_final_distribution_recieved_request() throws Throwable {
275 int expectedNumberOfRequestsSentByASDC = calculateExcpectedNumberOfDistributionRequets();
276 Function<Integer, Boolean> resultVerifier = actualStatusList -> actualStatusList >= expectedNumberOfRequestsSentByASDC;
277 retryMethodOnResult(() -> numberOfFinalDistributionsSentByASDC(expectedNumberOfRequestsSentByASDC),
278 resultVerifier, maxStepWaitTimeMs, 500);
279 int actualNumberOfRequestsSentByASDC = numberOfFinalDistributionsSentByASDC(expectedNumberOfRequestsSentByASDC);
280 assertThat(actualNumberOfRequestsSentByASDC, is(expectedNumberOfRequestsSentByASDC));
283 @Then("^All MSO-WD Simulators Sent The Distribution Complete Notifications$")
284 public void all_mso_wd_simulators_sent_the_distribution_complete_notifications() {
285 // Wait Watch Dogs To Send Final Distribution
286 int excpectedNumberOfDistributionCompleteNotifications = calculateExcpectedNumberOfDistributionRequets();
287 final Function<List<String>, Boolean> resultVerifier = actualStatusList -> actualStatusList
288 .size() == excpectedNumberOfDistributionCompleteNotifications;
289 retryMethodOnResult(() -> wdFinalStatusSent, resultVerifier, maxStepWaitTimeMs, 500);
290 assertThat(wdFinalStatusSent.size(), is(excpectedNumberOfDistributionCompleteNotifications));
292 @Then("^All Artifacts were downloaded by Simulators$")
293 public void all_artifacts_downloaded() {
294 // Wait Watch Dogs To Send Final Distribution
295 int excpectedNumberOfArtifactsToDownload = numOfArtifactsToDownload * envIds.size() * uuidServicesList.size();
296 assertThat(totalNumOfArtifactsToDownload, is(excpectedNumberOfArtifactsToDownload));
298 // ############################# Then - End #############################
300 private List<OperationalEnvironmentEntry> getCurrentEnvironmets(String status) {
301 Either<List<OperationalEnvironmentEntry>, CassandraOperationStatus> eitherStatus = operationalEnvironmentDao
302 .getByEnvironmentsStatus(EnvironmentStatusEnum.getByName(status));
303 assertThat(eitherStatus.isLeft(), is(true));
305 List<OperationalEnvironmentEntry> environmentsRetrieved = eitherStatus.left().value();
307 List<OperationalEnvironmentEntry> environmentsFound = environmentsRetrieved.stream()
308 .filter(env -> envIds.contains(env.getEnvironmentId())).collect(Collectors.toList());
309 return environmentsFound;
312 private int numberOfFinalDistributionsSentByASDC(int expectedNumberOfRequestsSentByASDC) {
313 final int newVal = msoMockServer.retrieveRecordedRequests(msoHttpRequest).length;
314 if (newVal != numberOfFinalDistributionsSentByASDC) {
315 System.out.println(String.format(
316 "MSO Server Simulator Recieved %s/%s Final Distribution Complete Rest Reports From ASDC", newVal,
317 expectedNumberOfRequestsSentByASDC));
318 numberOfFinalDistributionsSentByASDC = newVal;
324 private int calculateExcpectedNumberOfDistributionRequets() {
325 int numberOfDistributionRequests = envList.size() * uuidServicesList.size();
326 return numberOfDistributionRequests;
329 private static OperationalEnvironmentDao createDaoObj() {
330 AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(ImportTableConfig.class);
331 final OperationalEnvironmentDao openvDao = (OperationalEnvironmentDao) context
332 .getBean("operational-environment-dao");
336 private OperationalEnvironmentEntry getRecord(String environmentId) {
337 Either<OperationalEnvironmentEntry, CassandraOperationStatus> result = operationalEnvironmentDao
339 return result.isLeft() ? result.left().value() : null;
342 private void validateStringFieldPresent(boolean fieldExist,
343 Function<OperationalEnvironmentEntry, String> getFieldFunc, String envId, String msg) {
344 OperationalEnvironmentEntry record = recordMap.computeIfAbsent(envId, this::getRecord);
346 assertNotNull(record, "Expected DB record was not found");
348 String actualValue = getFieldFunc.apply(record);
350 assertEquals(fieldExist, !Strings.isNullOrEmpty(actualValue), msg);
353 private void setAaiMockServer(String aaiResponseBody) {
354 HttpRequest httpRequest = request().withMethod("GET").withPath(AAI_PATH_REGEX)
355 .withHeaders(new Header(HttpHeaders.CONTENT_TYPE, ContentType.APPLICATION_JSON.getMimeType()));
357 aaiMockServer.when(httpRequest)
359 .withHeaders(new Header(HttpHeaders.CONTENT_TYPE, ContentType.APPLICATION_JSON.getMimeType()))
360 .withBody(aaiResponseBody));
363 private IDistributionClient simulateDistributionClientWD(String topicName, OperationalEnvironmentEntry opEnv) {
365 IDistributionClient client = DistributionClientFactory.createDistributionClient();
366 final IConfiguration buildDistributionClientConfiguration = buildDistributionClientConfiguration(topicName,
368 IDistributionClientResult initResult = client.init(buildDistributionClientConfiguration,
369 new INotificationCallback() {
372 public void activateCallback(INotificationData data) {
373 buildWdSimulatorCallback(opEnv, client, buildDistributionClientConfiguration, data);
378 assertThat(initResult.getDistributionActionResult(), is(DistributionActionResultEnum.SUCCESS));
379 IDistributionClientResult startResult = client.start();
380 assertThat(startResult.getDistributionActionResult(), is(DistributionActionResultEnum.SUCCESS));
381 System.out.println(String.format("WD Simulator On Environment:\"%s\" Started Successfully",
382 buildDistributionClientConfiguration.getConsumerID()));
386 private IFinalDistrStatusMessage buildFinalDistribution() {
387 return new IFinalDistrStatusMessage() {
390 public long getTimestamp() {
391 return System.currentTimeMillis();
395 public DistributionStatusEnum getStatus() {
396 return DistributionStatusEnum.DISTRIBUTION_COMPLETE_OK;
400 public String getDistributionID() {
401 return "FakeDistributionId";
406 private IConfiguration buildDistributionClientConfiguration(String topicName, OperationalEnvironmentEntry opEnv) {
407 return new IConfiguration() {
409 public String getUser() {
413 public int getPollingTimeout() {
417 public int getPollingInterval() {
421 public String getPassword() {
425 public String getEnvironmentName() {
429 public String getConsumerID() {
430 return opEnv.getEnvironmentId();
433 public String getConsumerGroup() {
434 return String.format("BenchMarkDistributionClientConsumerGroup%s", opEnv.getEnvironmentId());
437 public String getAsdcAddress() {
438 return String.format("%s:8443", asdcAddress);
442 public String getKeyStorePath() {
443 // TODO Auto-generated method stub
448 public String getKeyStorePassword() {
449 // TODO Auto-generated method stub
454 public boolean activateServerTLSAuth() {
455 // TODO Auto-generated method stub
460 public List<String> getRelevantArtifactTypes() {
461 return Arrays.asList(ArtifactTypeEnum.values()).stream()
462 .map(artifactTypeEnum -> artifactTypeEnum.name()).collect(Collectors.toList());
466 public boolean isFilterInEmptyResources() {
467 // TODO Auto-generated method stub
472 public Boolean isUseHttpsWithDmaap() {
477 public List<String> getMsgBusAddress() {
478 return opEnv.getDmaapUebAddress().stream().map(this::extractHost).collect(Collectors.toList());
481 private String extractHost(String url) {
482 return url.split(":")[0];
487 private void distributeServiceInEnv(OperationalEnvironmentEntry env) {
488 uuidServicesList.stream().forEach(serviceUUID -> distributeSingleService(env, serviceUUID));
491 private void distributeSingleService(OperationalEnvironmentEntry env, String serviceUUID) {
492 IHttpAsdcClient client = new HttpAsdcClient(buildDistributionClientConfiguration(StringUtils.EMPTY, env));
493 String pattern = "/sdc/v1/catalog/services/%s/distribution/%s/activate";
494 String requestUrl = String.format(pattern, serviceUUID, env.getEnvironmentId());
495 String requestBody = String.format("{\"workloadContext\":\"%s\"}", env.getEnvironmentId());
496 StringEntity body = new StringEntity(requestBody, ContentType.APPLICATION_JSON);
497 Map<String, String> headersMap = new HashMap<>();
498 headersMap.put("USER_ID", "cs0008");
499 headersMap.put("X-ECOMP-InstanceID", "test");
500 headersMap.put("Content-Type", "application/json");
502 HttpAsdcResponse postRequest = FunctionalInterfaces.retryMethodOnResult(
503 () -> distributeMethod(client, requestUrl, serviceUUID, body, headersMap, env.getEnvironmentId()),
504 resp -> resp.getStatus() == HttpStatus.SC_ACCEPTED);
505 assertThat(postRequest.getStatus(), is(HttpStatus.SC_ACCEPTED));
509 private HttpAsdcResponse distributeMethod(IHttpAsdcClient client, String requestUrl, String serviceUUID,
510 StringEntity body, Map<String, String> headersMap, String envId) {
512 final HttpAsdcResponse postRequest = client.postRequest(requestUrl, body, headersMap);
513 final String message = String.format(
514 "MSO Client Simulator Distributes Service:%s On Environment:\"%s\" - Recieved Response: %s", serviceUUID, envId,
515 postRequest.getStatus());
516 if (postRequest.getStatus() != HttpStatus.SC_ACCEPTED) {
517 System.err.println(message);
519 System.out.println(message);
525 private String convertUebAddressToList(OperationalEnvironmentEntry op) {
526 Set<String> dmaapUebAddress = op.getDmaapUebAddress();
527 Wrapper<String> resultWrapper = new Wrapper<>(StringUtils.EMPTY);
528 if (!CollectionUtils.isEmpty(dmaapUebAddress)) {
529 dmaapUebAddress.stream()
530 .forEach(uebAddress -> resultWrapper.setInnerElement(resultWrapper.getInnerElement() + uebAddress));
533 return resultWrapper.getInnerElement();
536 private void buildWdSimulatorCallback(OperationalEnvironmentEntry opEnv, IDistributionClient client,
537 final IConfiguration buildDistributionClientConfiguration, INotificationData data) {
538 if (StringUtils.equals(data.getWorkloadContext(), opEnv.getEnvironmentId())) {
540 final String expectedArtifactType = org.openecomp.sdc.common.api.ArtifactTypeEnum.MODEL_INVENTORY_PROFILE.name();
541 Optional<IArtifactInfo> optional = data.getServiceArtifacts().stream().filter( artifact -> {
542 return StringUtils.equals(artifact.getArtifactType(), expectedArtifactType);
545 for (int i = 0; i < numOfArtifactsToDownload; i++) {
546 optional.ifPresent( artifactInfo -> simulateDownload(client , artifactInfo, data) );
547 optional.orElseThrow( () -> handleArtifactNotFound(expectedArtifactType, data));
550 if( numOfArtifactsToDownload > 0 ){
551 System.out.println(String.format(
552 "ASDC Consumer Simulator On Environment:\"%s\" Downloaded %s Artifacts From ASDC Service with UUID:%s Total Artifacts Downloaded from ASDC is: %s",
553 data.getWorkloadContext(), numOfArtifactsToDownload,
554 data.getServiceUUID(), totalNumOfArtifactsToDownload));
557 IDistributionClientResult finalDistrStatus = client.sendFinalDistrStatus(buildFinalDistribution());
558 assertThat(finalDistrStatus.getDistributionActionResult(), is(DistributionActionResultEnum.SUCCESS));
559 wdFinalStatusSent.add(data.getWorkloadContext());
561 System.out.println(String.format(
562 "WD Simulator On Environment:\"%s\" Recieved Notification From ASDC On WorkLoad: %s And Service UUID:%s And Sends Distribution Complete Notification",
563 buildDistributionClientConfiguration.getConsumerID(), data.getWorkloadContext(),
564 data.getServiceUUID()));
568 private IllegalStateException handleArtifactNotFound(String expectedArtifactType, INotificationData data ){
569 final String stringMessage = String.format("Did Not Find Artifact of type: %s to download from service with UUID:%s", expectedArtifactType, data.getServiceUUID());
570 System.err.println(stringMessage);
571 return new IllegalStateException(stringMessage);
575 private void simulateDownload(IDistributionClient client, IArtifactInfo info, INotificationData data){
576 IDistributionClientDownloadResult downloadResult = client.download(info);
577 if( downloadResult.getDistributionActionResult() != DistributionActionResultEnum.SUCCESS ){
578 System.err.println(String.format("Client Simulator %s Failed to download artifact from service : %s", client.getConfiguration().getConsumerID(), data.getServiceUUID()));
579 assertThat(downloadResult.getDistributionActionResult(), is(DistributionActionResultEnum.SUCCESS));
582 totalNumOfArtifactsToDownload++;