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%2Fparallelapsp%2Ftest%2FDependentWiringTest.java;fp=opendaylight%2Fconfig%2Fconfig-manager%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fmanager%2Ftestingservices%2Fparallelapsp%2Ftest%2FDependentWiringTest.java;h=f9a11301e1aaf09b98d8af43bd965f1f8902e153;hb=5e0aafd8aa4830a4d4df0f4768e6c85245875958;hp=5b1a6f6e8184f69805ec5245e2d4b99089467e5d;hpb=9f9188b4b31a8962b83527d03bec8a4c75e733ed;p=controller.git diff --git a/opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/parallelapsp/test/DependentWiringTest.java b/opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/parallelapsp/test/DependentWiringTest.java index 5b1a6f6e81..f9a11301e1 100644 --- a/opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/parallelapsp/test/DependentWiringTest.java +++ b/opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/parallelapsp/test/DependentWiringTest.java @@ -7,17 +7,6 @@ */ package org.opendaylight.controller.config.manager.testingservices.parallelapsp.test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; -import static org.junit.internal.matchers.StringContains.containsString; - -import java.util.Map; - -import javax.management.ObjectName; - -import org.json.simple.JSONObject; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -32,7 +21,15 @@ import org.opendaylight.controller.config.manager.testingservices.threadpool.Tes import org.opendaylight.controller.config.manager.testingservices.threadpool.TestingFixedThreadPoolConfigMXBean; import org.opendaylight.controller.config.manager.testingservices.threadpool.TestingFixedThreadPoolModuleFactory; import org.opendaylight.controller.config.util.ConfigTransactionJMXClient; -import org.opendaylight.controller.config.util.jolokia.ConfigTransactionJolokiaClient; + +import javax.management.ObjectName; +import java.util.Map; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; +import static org.junit.internal.matchers.StringContains.containsString; public class DependentWiringTest extends AbstractParallelAPSPTest { private final String fixed1 = "fixed1"; @@ -135,44 +132,4 @@ public class DependentWiringTest extends AbstractParallelAPSPTest { parallelAPSPRuntimeProxy.getMaxNumberOfThreads()); } - - @Test - public void testUsingJolokia() throws Exception { - - ConfigTransactionJolokiaClient transactionClient = configRegistryJolokiaClient - .createTransaction(); - // fixed1 - ObjectName fixed1ON = transactionClient.createModule( - getThreadPoolImplementationName(), fixed1); - transactionClient.setAttribute(fixed1ON, "ThreadCount", - TestingParallelAPSPImpl.MINIMAL_NUMBER_OF_THREADS); - - // apsp-parallel with syntetic attrib - String threadPoolString = "ThreadPool"; - ObjectName apsp1ON = transactionClient.createModule( - TestingParallelAPSPModuleFactory.NAME, apsp1); - transactionClient.setAttribute(apsp1ON, threadPoolString, fixed1ON); - // check - assertEquals(ObjectNameUtil.withoutTransactionName(fixed1ON), - transactionClient.getAttributeON(apsp1ON, threadPoolString)); - transactionClient.setAttribute(apsp1ON, "SomeParam", "ahoj"); - - // commit - transactionClient.commit(); - // check thread pool - assertEquals(1, TestingFixedThreadPool.allExecutors.size()); - // check platform MBeanServer - ObjectName apspReadOnlyON = ObjectNameUtil - .withoutTransactionName(apsp1ON); - JSONObject threadPoolONJson = (JSONObject) configRegistryJolokiaClient - .getAttribute(apspReadOnlyON, threadPoolString); - ObjectName fixed1ReadOnlyON = ObjectNameUtil - .withoutTransactionName(fixed1ON); - assertEquals(fixed1ReadOnlyON, ObjectNameUtil.createON(threadPoolONJson - .get("objectName").toString())); - assertEquals(fixed1ReadOnlyON, - configRegistryJolokiaClient.getAttributeON(apspReadOnlyON, - threadPoolString)); - - } }