summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.sdnc
diff options
context:
space:
mode:
Diffstat (limited to 'models-interactions/model-actors/actor.sdnc')
-rw-r--r--models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/SdncOperation.java6
-rw-r--r--models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/BasicSdncOperation.java7
2 files changed, 9 insertions, 4 deletions
diff --git a/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/SdncOperation.java b/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/SdncOperation.java
index ca6d07b16..9b6394315 100644
--- a/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/SdncOperation.java
+++ b/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/SdncOperation.java
@@ -61,7 +61,6 @@ public abstract class SdncOperation extends HttpOperation<SdncResponse> {
protected CompletableFuture<OperationOutcome> startOperationAsync(int attempt, OperationOutcome outcome) {
SdncRequest request = makeRequest(attempt);
- Entity<SdncRequest> entity = Entity.entity(request, MediaType.APPLICATION_JSON);
Map<String, Object> headers = makeHeaders();
@@ -69,7 +68,10 @@ public abstract class SdncOperation extends HttpOperation<SdncResponse> {
String path = getPath();
String url = getClient().getBaseUrl() + path;
- logMessage(EventType.OUT, CommInfrastructure.REST, url, request);
+ String strRequest = prettyPrint(request);
+ logMessage(EventType.OUT, CommInfrastructure.REST, url, strRequest);
+
+ Entity<String> entity = Entity.entity(strRequest, MediaType.APPLICATION_JSON);
// @formatter:off
return handleResponse(outcome, url,
diff --git a/models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/BasicSdncOperation.java b/models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/BasicSdncOperation.java
index 921694269..5cc09560f 100644
--- a/models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/BasicSdncOperation.java
+++ b/models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/BasicSdncOperation.java
@@ -36,6 +36,7 @@ import java.util.concurrent.TimeoutException;
import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
import org.onap.policy.common.endpoints.http.client.HttpClientFactoryInstance;
import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance;
+import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.common.utils.coder.StandardCoder;
import org.onap.policy.controlloop.actor.test.BasicHttpOperation;
import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
@@ -114,7 +115,7 @@ public abstract class BasicSdncOperation extends BasicHttpOperation<SdncRequest>
* @return the request that was posted
*/
protected SdncRequest verifyOperation(SdncOperation operation)
- throws InterruptedException, ExecutionException, TimeoutException {
+ throws InterruptedException, ExecutionException, TimeoutException, CoderException {
CompletableFuture<OperationOutcome> future2 = operation.start();
executor.runAll(100);
@@ -132,7 +133,9 @@ public abstract class BasicSdncOperation extends BasicHttpOperation<SdncRequest>
assertNotNull(outcome.getSubRequestId());
- return requestCaptor.getValue().getEntity();
+ String reqText = requestCaptor.getValue().getEntity();
+
+ return coder.decode(reqText, SdncRequest.class);
}
/**