diff options
author | Marcin Migdal <marcin.migdal@nokia.com> | 2019-03-20 12:45:59 +0100 |
---|---|---|
committer | Marcin Migdal <marcin.migdal@nokia.com> | 2019-03-20 12:46:07 +0100 |
commit | bccafdc99094a8ff9107f242b31f80e5a839b5c2 (patch) | |
tree | ab6b8fee5d46417f4f1e469da51f875d0aa6fe3d /prh-app-server/src/main | |
parent | 295746ec486e0300e7d5958ba44f8054c30389f4 (diff) |
Fix Junits
Change-Id: I4ed75b52a8d6266a4e09da3382fc06f3ed4c0ae0
Issue-ID: DCAEGEN2-1078
Signed-off-by: Marcin Migdal <marcin.migdal@nokia.com>
Diffstat (limited to 'prh-app-server/src/main')
2 files changed, 3 insertions, 9 deletions
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTaskImpl.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTaskImpl.java index 69246090..3318d331 100644 --- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTaskImpl.java +++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/DmaapConsumerTaskImpl.java @@ -21,7 +21,6 @@ package org.onap.dcaegen2.services.prh.tasks; import com.google.gson.JsonArray; -import java.util.Objects; import java.util.Optional; import javax.net.ssl.SSLException; import org.onap.dcaegen2.services.prh.configuration.Config; @@ -30,7 +29,6 @@ import org.onap.dcaegen2.services.prh.service.DmaapConsumerJsonParser; import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.service.consumer.ConsumerReactiveHttpClientFactory; import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.service.consumer.DMaaPConsumerReactiveHttpClient; import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.service.consumer.DMaaPReactiveWebClientFactory; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -53,12 +51,12 @@ public class DmaapConsumerTaskImpl implements DmaapConsumerTask { @Autowired public DmaapConsumerTaskImpl(Config config) { this(config, new DmaapConsumerJsonParser(), - new ConsumerReactiveHttpClientFactory(new DMaaPReactiveWebClientFactory())); + new ConsumerReactiveHttpClientFactory(new DMaaPReactiveWebClientFactory())); } DmaapConsumerTaskImpl(Config prhAppConfig, - DmaapConsumerJsonParser dmaapConsumerJsonParser, - ConsumerReactiveHttpClientFactory httpClientFactory) { + DmaapConsumerJsonParser dmaapConsumerJsonParser, + ConsumerReactiveHttpClientFactory httpClientFactory) { this.config = prhAppConfig; this.dmaapConsumerJsonParser = dmaapConsumerJsonParser; this.httpClientFactory = httpClientFactory; @@ -73,7 +71,6 @@ public class DmaapConsumerTaskImpl implements DmaapConsumerTask { public Flux<ConsumerDmaapModel> execute(String object) throws SSLException { DMaaPConsumerReactiveHttpClient dmaaPConsumerReactiveHttpClient = resolveClient(); LOGGER.debug("Method called with arg {}", object); - Mono<JsonArray> response = dmaaPConsumerReactiveHttpClient.getDMaaPConsumerResponse( Optional.empty()); return dmaapConsumerJsonParser.getJsonObject(response); diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/ScheduledTasks.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/ScheduledTasks.java index 7ecf4a6e..6ae8a3c7 100644 --- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/ScheduledTasks.java +++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/ScheduledTasks.java @@ -32,7 +32,6 @@ import org.onap.dcaegen2.services.prh.exceptions.DmaapEmptyResponseException; import org.onap.dcaegen2.services.prh.exceptions.PrhTaskException; import org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel; import org.onap.dcaegen2.services.prh.model.logging.MdcVariables; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.slf4j.MDC; @@ -109,9 +108,7 @@ public class ScheduledTasks { } private void onSuccess(HttpClientResponse response) { - String statusCode = Integer.toString(response.status().code()); - MDC.put(RESPONSE_CODE, statusCode); logger.info("Prh consumed tasks successfully. HTTP Response code from DMaaPProducer {}", statusCode); |