X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fconfig%2Fconfig-manager%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fmanager%2Ftestingservices%2Fthreadpool%2Ftest%2FSimpleConfigurationTest.java;h=c20d3bfc04090bafbc1b4406c03453c7c353f225;hp=4ed10036f78e0262442a9986ef14aabbb85db42d;hb=0425b7a2e7d4cd7fbc5ed767fa96e44f11671cd1;hpb=2f6b6ce8abca0cf38c857900bf5a84183ef5e9dc diff --git a/opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/threadpool/test/SimpleConfigurationTest.java b/opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/threadpool/test/SimpleConfigurationTest.java index 4ed10036f7..c20d3bfc04 100644 --- a/opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/threadpool/test/SimpleConfigurationTest.java +++ b/opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/threadpool/test/SimpleConfigurationTest.java @@ -212,11 +212,9 @@ public class SimpleConfigurationTest extends AbstractConfigTest { ObjectName fixed1name = firstCommit(); // 2, check that configuration was copied to platform - DynamicMBean dynamicMBean = configRegistryClient.newMBeanProxy( - ObjectNameUtil.withoutTransactionName(fixed1name), - DynamicMBean.class); - dynamicMBean.getMBeanInfo(); - assertEquals(numberOfThreads, dynamicMBean.getAttribute("ThreadCount")); + ObjectName on = ObjectNameUtil.withoutTransactionName(fixed1name); + platformMBeanServer.getMBeanInfo(on); + assertEquals(numberOfThreads, platformMBeanServer.getAttribute(on, "ThreadCount")); // 3, shutdown fixed1 in new transaction assertFalse(TestingFixedThreadPool.allExecutors.get(0).isShutdown()); @@ -249,10 +247,10 @@ public class SimpleConfigurationTest extends AbstractConfigTest { // dynamic config should be removed from platform try { - dynamicMBean.getMBeanInfo(); + platformMBeanServer.getMBeanInfo(on); fail(); } catch (Exception e) { - assertTrue(e.getCause() instanceof InstanceNotFoundException); + assertTrue(e instanceof InstanceNotFoundException); } }