From 6eef01205c39cc155a8b6f5de25a564b44c919f9 Mon Sep 17 00:00:00 2001 From: Eylon Malin Date: Thu, 22 Aug 2019 15:22:17 +0300 Subject: make scheduler client tolerance to error messages Read response from scheduler as String save them as raw, and only then parse them Issue-ID: VID-378 Signed-off-by: Eylon Malin Change-Id: I38ed8f211b2c111b57741254cb5e90317fefdc7d Signed-off-by: Eylon Malin --- .../src/test/java/org/onap/vid/asdc/rest/SdcRestClientITTest.java | 2 +- .../src/test/java/org/onap/vid/testUtils/StubServerUtil.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'vid-app-common/src/test/java/org') diff --git a/vid-app-common/src/test/java/org/onap/vid/asdc/rest/SdcRestClientITTest.java b/vid-app-common/src/test/java/org/onap/vid/asdc/rest/SdcRestClientITTest.java index 126f30067..589874d2a 100644 --- a/vid-app-common/src/test/java/org/onap/vid/asdc/rest/SdcRestClientITTest.java +++ b/vid-app-common/src/test/java/org/onap/vid/asdc/rest/SdcRestClientITTest.java @@ -85,7 +85,7 @@ public class SdcRestClientITTest { String expectedEndpoint = String.format("/sdc/v1/catalog/services/%s/toscaModel", uuid); stubServer.prepareGetCall( - expectedEndpoint, stringContent("sampleFileContent"), "sampleFileContent", ok(), "application/octet-stream"); + expectedEndpoint, stringContent("sampleFileContent"), ok(), "application/octet-stream"); Path serviceToscaModel = sdcRestClient.getServiceToscaModel(uuid); diff --git a/vid-app-common/src/test/java/org/onap/vid/testUtils/StubServerUtil.java b/vid-app-common/src/test/java/org/onap/vid/testUtils/StubServerUtil.java index 3f5bf8163..848f80b1e 100644 --- a/vid-app-common/src/test/java/org/onap/vid/testUtils/StubServerUtil.java +++ b/vid-app-common/src/test/java/org/onap/vid/testUtils/StubServerUtil.java @@ -64,7 +64,7 @@ public class StubServerUtil { return String.format("%s://localhost:%s/%s", protocol, stubServer.getPort(), relativePath); } - public void prepareGetCall(String path, Action actionToReturn,Object returnObj, Action expectedAction, String contentType) throws JsonProcessingException { + public void prepareGetCall(String path, Action actionToReturn, Action expectedAction, String contentType) throws JsonProcessingException { whenHttp(stubServer) .match(Condition.get(path)) .then(expectedAction, actionToReturn, contentType(contentType)); @@ -72,7 +72,7 @@ public class StubServerUtil { public void prepareGetCall(String path, Object returnObj, Action expectedAction) throws JsonProcessingException { - prepareGetCall(path, jsonContent(returnObj),returnObj, expectedAction, APPLICATION_JSON); + prepareGetCall(path, jsonContent(returnObj), expectedAction, APPLICATION_JSON); } public void prepareDeleteCall(String path, Object returnObj, Action expectedAction) throws JsonProcessingException { -- cgit 1.2.3-korg