X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fconfig%2Fconfig-manager%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fmanager%2Ftestingservices%2Fscheduledthreadpool%2Ftest%2FTwoInterfacesExportTest.java;h=0e6a54fdc9b1b9cee4d74fda75fa8154db8a9866;hb=3a71a222b896b9d07e638af62300180799bdac67;hp=9c8b575fe59a799ca13bd10dd3558a2270fa8596;hpb=660a4a4a51718896518b8c4deeeb6e0bb3637bde;p=controller.git diff --git a/opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/scheduledthreadpool/test/TwoInterfacesExportTest.java b/opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/scheduledthreadpool/test/TwoInterfacesExportTest.java index 9c8b575fe5..0e6a54fdc9 100644 --- a/opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/scheduledthreadpool/test/TwoInterfacesExportTest.java +++ b/opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/scheduledthreadpool/test/TwoInterfacesExportTest.java @@ -13,11 +13,13 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; + import javax.annotation.Nullable; -import javax.management.DynamicMBean; import javax.management.InstanceAlreadyExistsException; import javax.management.InstanceNotFoundException; +import javax.management.IntrospectionException; import javax.management.ObjectName; +import javax.management.ReflectionException; import org.junit.Test; import org.opendaylight.controller.config.api.ValidationException; import org.opendaylight.controller.config.api.jmx.ObjectNameUtil; @@ -36,20 +38,17 @@ public class TwoInterfacesExportTest extends AbstractScheduledTest { private void assertExists(@Nullable final ConfigTransactionJMXClient transaction, final String moduleName, final String instanceName) - throws InstanceNotFoundException { + throws InstanceNotFoundException, IntrospectionException, ReflectionException { if (transaction != null) { transaction.lookupConfigBean(moduleName, instanceName); // make a dummy call - configRegistryClient.newMBeanProxy( - ObjectNameUtil.createTransactionModuleON( - transaction.getTransactionName(), moduleName, - instanceName), DynamicMBean.class).getMBeanInfo(); + platformMBeanServer.getMBeanInfo(ObjectNameUtil.createTransactionModuleON( + transaction.getTransactionName(), moduleName, instanceName)); } else { configRegistryClient.lookupConfigBean(moduleName, instanceName); // make a dummy call - configRegistryClient.newMBeanProxy( - ObjectNameUtil.createReadOnlyModuleON(moduleName, - instanceName), DynamicMBean.class).getMBeanInfo(); + platformMBeanServer.getMBeanInfo(ObjectNameUtil.createReadOnlyModuleON(moduleName, + instanceName)); } } @@ -172,7 +171,7 @@ public class TwoInterfacesExportTest extends AbstractScheduledTest { ObjectName apspName = transaction.createModule( TestingParallelAPSPModuleFactory.NAME, "apsp1"); - TestingParallelAPSPConfigMXBean apspProxy = transaction.newMBeanProxy( + TestingParallelAPSPConfigMXBean apspProxy = transaction.newMXBeanProxy( apspName, TestingParallelAPSPConfigMXBean.class); apspProxy.setThreadPool(scheduledName); apspProxy.setSomeParam("someParam"); @@ -189,7 +188,7 @@ public class TwoInterfacesExportTest extends AbstractScheduledTest { ObjectName apspName = transaction.createModule( TestingParallelAPSPModuleFactory.NAME, "apsp1"); - TestingParallelAPSPConfigMXBean apspProxy = transaction.newMBeanProxy( + TestingParallelAPSPConfigMXBean apspProxy = transaction.newMXBeanProxy( apspName, TestingParallelAPSPConfigMXBean.class); apspProxy.setThreadPool(ObjectNameUtil.createReadOnlyModuleON( TestingScheduledThreadPoolModuleFactory.NAME, scheduled1));