summaryrefslogtreecommitdiffstats
path: root/vid-app-common/src
diff options
context:
space:
mode:
authorEylon Malin <eylon.malin@intl.att.com>2019-10-24 12:43:12 +0300
committerEylon Malin <eylon.malin@intl.att.com>2019-10-24 12:43:12 +0300
commit55f21cee67b36dd6352a775a50ef048a0ff35140 (patch)
tree705e7390af333c764de5e653d6492f7c414d1a6c /vid-app-common/src
parentb4beb977c8dade82e27b37119992df817ecb67b5 (diff)
fix ApacheClientMetricInterceptor to return expected ResponseCode
Issue-ID: VID-253 Signed-off-by: Eylon Malin <eylon.malin@intl.att.com> Change-Id: I5c90f5bcbf34eee28c192128333ca940558ecb30
Diffstat (limited to 'vid-app-common/src')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/logging/ApacheClientMetricInterceptor.java2
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/logging/ApacheClientMetricInterceptorTest.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/logging/ApacheClientMetricInterceptor.java b/vid-app-common/src/main/java/org/onap/vid/logging/ApacheClientMetricInterceptor.java
index f5b09501e..51e684456 100644
--- a/vid-app-common/src/main/java/org/onap/vid/logging/ApacheClientMetricInterceptor.java
+++ b/vid-app-common/src/main/java/org/onap/vid/logging/ApacheClientMetricInterceptor.java
@@ -51,7 +51,7 @@ public abstract class ApacheClientMetricInterceptor extends AbstractMetricLogFil
@Override
protected String getResponseCode(HttpResponse httpResponse) {
- return httpResponse.getStatusLine().getReasonPhrase();
+ return String.valueOf(httpResponse.getStatusLine().getStatusCode());
}
@Override
diff --git a/vid-app-common/src/test/java/org/onap/vid/logging/ApacheClientMetricInterceptorTest.java b/vid-app-common/src/test/java/org/onap/vid/logging/ApacheClientMetricInterceptorTest.java
index 29f17b2e7..43f986501 100644
--- a/vid-app-common/src/test/java/org/onap/vid/logging/ApacheClientMetricInterceptorTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/logging/ApacheClientMetricInterceptorTest.java
@@ -67,7 +67,7 @@ public class ApacheClientMetricInterceptorTest {
@Test
public void testGetResponseCode() {
- assertEquals(interceptor.getResponseCode(response), "ok");
+ assertEquals(interceptor.getResponseCode(response), "200");
}
@Test