diff options
author | Ittay Stern <ittay.stern@att.com> | 2019-11-04 14:30:56 +0200 |
---|---|---|
committer | Ittay Stern <ittay.stern@att.com> | 2019-11-04 14:40:22 +0200 |
commit | 43b1593e3c2a250535bfadcc6829be9873a98259 (patch) | |
tree | e6d1e551d2a6f3846b836190b0630ea9c03e0069 /vid-automation/src/test/java | |
parent | 95dc3ee8072b633982d7bcd18b726350f2f6dc06 (diff) |
fix - when retrieve topology we are using threadPool and the MDC values are not updated
This time for vf-modules parallel request.
Issue-ID: VID-253
Change-Id: Ib32c29b231e16ccc1b4fbbad022c8d9ad058b74a
Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-automation/src/test/java')
-rw-r--r-- | vid-automation/src/test/java/org/onap/vid/api/ServiceTreeApiTest.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/vid-automation/src/test/java/org/onap/vid/api/ServiceTreeApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/ServiceTreeApiTest.java index 82cc72081..f8bdc97e2 100644 --- a/vid-automation/src/test/java/org/onap/vid/api/ServiceTreeApiTest.java +++ b/vid-automation/src/test/java/org/onap/vid/api/ServiceTreeApiTest.java @@ -179,8 +179,7 @@ public class ServiceTreeApiTest extends BaseApiTest { .replace("VNF4_INSTANCE_TYPE", vnfPreset4.getInstanceType()); assertJsonEquals(response, expected); - final String requestId = responseEntity.getHeaders().getFirst("X-ECOMP-RequestID-echo"); - LoggerFormatTest.assertHeadersAndMetricLogs(restTemplate, uri, requestId, "/network/generic-vnfs/generic-vnf/", 5); + LoggerFormatTest.assertHeadersAndMetricLogs(restTemplate, uri, echoedRequestId(responseEntity), "/network/generic-vnfs/generic-vnf/", 5); } @Test @@ -292,9 +291,14 @@ public class ServiceTreeApiTest extends BaseApiTest { .replace("NETWORK4_INSTANCE_NAME", l3NetworkPreset4.getInstanceName()) .replace("NETWORK4_INSTANCE_ID", l3NetworkPreset4.getInstanceId()); - String response = restTemplate.getForObject(buildUri(API_URL), String.class, "global-customer-id", "service-instance-type", "service-instance-id"); + ResponseEntity<String> response = restTemplate.getForEntity(buildUri(API_URL), String.class, "global-customer-id", "service-instance-type", "service-instance-id"); - assertJsonEquals(response, expected); + assertJsonEquals(response.getBody(), expected); + LoggerFormatTest.assertHeadersAndMetricLogs(restTemplate, uri, echoedRequestId(response), "/vf-modules", 2); + } + + private String echoedRequestId(ResponseEntity<?> response) { + return response.getHeaders().getFirst("X-ECOMP-RequestID-echo"); } @Override |