X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=common%2Fonap-common-configuration-management%2Fonap-configuration-management-core%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fconfig%2Ftest%2FCliFallbackAndLookupTest.java;fp=common%2Fonap-common-configuration-management%2Fonap-configuration-management-core%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fconfig%2Ftest%2FCliFallbackAndLookupTest.java;h=0d9da6455fc6f142f7b0a976b6bdd313700f2669;hb=461e964344d01e245464980b6ace12e4b28569e6;hp=48aecf4adc4fce5434b4b94bf177755fe4277ee2;hpb=eba6fee58790a1ffece980de44100b21764051ca;p=sdc.git diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/CliFallbackAndLookupTest.java b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/CliFallbackAndLookupTest.java index 48aecf4adc..0d9da6455f 100644 --- a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/CliFallbackAndLookupTest.java +++ b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/CliFallbackAndLookupTest.java @@ -17,18 +17,14 @@ package org.onap.config.test; import java.io.IOException; -import java.lang.management.ManagementFactory; import java.util.HashMap; import java.util.Map; -import javax.management.JMX; -import javax.management.MBeanServerConnection; -import javax.management.ObjectName; import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import org.onap.config.Constants; import org.onap.config.api.ConfigurationManager; +import org.onap.config.impl.CliConfigurationImpl; import org.onap.config.util.ConfigTestConstant; import org.onap.config.util.TestUtil; @@ -60,22 +56,18 @@ public class CliFallbackAndLookupTest { input.put("namespace", NAMESPACE); input.put("key", ConfigTestConstant.ARTIFACT_MAXSIZE); - MBeanServerConnection mbsc = ManagementFactory.getPlatformMBeanServer(); - ObjectName mbeanName = new ObjectName(Constants.MBEAN_NAME); - ConfigurationManager conf = JMX.newMBeanProxy(mbsc, mbeanName, ConfigurationManager.class, true); + ConfigurationManager conf = new CliConfigurationImpl(); String maxSizeWithNoFallback = conf.getConfigurationValue(input); Assert.assertEquals("", maxSizeWithNoFallback); //Verify underlying resource without lookup switch input.put("key", ConfigTestConstant.ARTIFACT_JSON_SCHEMA); String jsonSchema = conf.getConfigurationValue(input); - System.out.println("jsonSchema==" + jsonSchema); Assert.assertEquals("@" + System.getProperty("user.home") + "/TestResources/GeneratorsList.json", jsonSchema); //Verify underlying resource with lookup switch input.put("externalLookup", true); jsonSchema = conf.getConfigurationValue(input); - System.out.println("jsonSchema==" + jsonSchema); Assert.assertEquals("{name:\"SCM\"}", jsonSchema); //Verify with fallback