diff options
author | ojasdubey <ojas.dubey@amdocs.com> | 2017-12-12 15:18:30 +0530 |
---|---|---|
committer | ojasdubey <ojas.dubey@amdocs.com> | 2017-12-12 18:24:18 +0530 |
commit | 29a456fd248ecf4178d85e2f914975fafc4c4093 (patch) | |
tree | 81e83f1ca94fdf55e372d5f5491f1572891fadb6 /common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/ConfigurationUtils.java | |
parent | c8983a6f979ede3817f060cfa5f93ee40a75fcf4 (diff) |
Fix - Translator core tests stuck
Updated invalid dbhost config value to empty
based on review comments
Issue-ID: SDC-748
Change-Id: Idc691bdc7e2b988654ae87c2581ccbdd86586aae
Signed-off-by: ojasdubey <ojas.dubey@amdocs.com>
Diffstat (limited to 'common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/ConfigurationUtils.java')
-rw-r--r-- | common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/ConfigurationUtils.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/ConfigurationUtils.java b/common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/ConfigurationUtils.java index 889efea3da..26ab2fecc8 100644 --- a/common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/ConfigurationUtils.java +++ b/common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/ConfigurationUtils.java @@ -489,6 +489,11 @@ public class ConfigurationUtils { */ public static boolean executeDdlSql(String sql) throws Exception { DataSource datasource = ConfigurationDataSource.lookup(); + if (datasource == null) { + System.err.println("DB configuration not found. Configuration management will be using " + + "in-memory persistence."); + return false; + } try (Connection con = datasource.getConnection(); Statement stmt = con.createStatement()) { stmt.executeQuery(sql); } catch (Exception exception) { |