From 806569f572bf2af202c7f9970fdb85ae1f7da9cd Mon Sep 17 00:00:00 2001 From: subhash kumar singh Date: Wed, 17 Jan 2018 10:36:15 +0000 Subject: UT improvement for catalog db UT improvement for catalog db. Change-Id: I711e84a4a80877f49552ddfef1ec5893daef7b0b Issue-ID: SO-360 Signed-off-by: subhash kumar singh --- .../java/org/openecomp/mso/db/catalog/CatalogDatabase.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'mso-catalog-db/src/main') diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java index 7d59d2e0ae..b5d8324872 100644 --- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java +++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java @@ -536,12 +536,12 @@ public class CatalogDatabase implements Closeable { } public Service getServiceByVersionAndInvariantId(String modelInvariantId, String modelVersion) throws Exception { - long startTime = System.currentTimeMillis (); - LOGGER.debug ("Catalog database - get service with modelInvariantId: " + modelInvariantId + " and modelVersion: " + modelVersion); + long startTime = System.currentTimeMillis(); + LOGGER.debug("Catalog database - get service with modelInvariantId: " + modelInvariantId + " and modelVersion: " + modelVersion); String hql = "FROM Service WHERE modelInvariantUUID = :MODEL_INVARIANT_UUID AND version = :VERSION_STR"; - Query query = getSession ().createQuery (hql); - query.setParameter ("MODEL_INVARIANT_UUID", modelInvariantId); + Query query = getSession().createQuery(hql); + query.setParameter("MODEL_INVARIANT_UUID", modelInvariantId); query.setParameter("VERSION_STR", modelVersion); Service result = null; @@ -554,11 +554,11 @@ public class CatalogDatabase implements Closeable { } // See if something came back. if (result==null) { - LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. Service not found", "CatalogDB", "getServiceByVersionAndInvariantId", null); + LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. Service not found", "CatalogDB", "getServiceByVersionAndInvariantId", null); return null; } - LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getServiceByVersionAndInvariantId", null); + LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getServiceByVersionAndInvariantId", null); return result; } -- cgit 1.2.3-korg