use of org.opendaylight.controller.config.util.ConfigTransactionJMXClient in project controller by opendaylight.
the class ITTest method testCreateBean.
@Test
public void testCreateBean() throws InstanceAlreadyExistsException, ValidationException, ConflictingVersionException {
ConfigTransactionJMXClient transaction = configRegistryClient.createTransaction();
createModule(transaction, instanceName);
transaction.validateConfig();
CommitStatus status = transaction.commit();
assertBeanCount(1, factory.getImplementationName());
assertStatus(status, 1, 0, 0);
}
use of org.opendaylight.controller.config.util.ConfigTransactionJMXClient in project controller by opendaylight.
the class ITTest method testReusingOldInstance.
@Test
public void testReusingOldInstance() throws InstanceAlreadyExistsException, ConflictingVersionException, ValidationException {
ConfigTransactionJMXClient transaction = configRegistryClient.createTransaction();
createModule(transaction, instanceName);
transaction.commit();
assertBeanCount(1, factory.getImplementationName());
transaction = configRegistryClient.createTransaction();
CommitStatus status = transaction.commit();
assertBeanCount(1, factory.getImplementationName());
assertStatus(status, 0, 0, 1);
}
use of org.opendaylight.controller.config.util.ConfigTransactionJMXClient in project controller by opendaylight.
the class ImmediateEventExecutorModuleTest method testReusingOldInstance.
@Test
public void testReusingOldInstance() throws InstanceAlreadyExistsException, ConflictingVersionException, ValidationException {
ConfigTransactionJMXClient transaction = configRegistryClient.createTransaction();
createInstance(transaction, instanceName);
transaction.commit();
transaction = configRegistryClient.createTransaction();
assertBeanCount(1, factory.getImplementationName());
CommitStatus status = transaction.commit();
assertBeanCount(1, factory.getImplementationName());
assertStatus(status, 0, 0, 1);
}
use of org.opendaylight.controller.config.util.ConfigTransactionJMXClient in project controller by opendaylight.
the class NettyThreadgroupModuleTest method testCreateBean.
@Test
public void testCreateBean() throws InstanceAlreadyExistsException, ValidationException, ConflictingVersionException {
ConfigTransactionJMXClient transaction = configRegistryClient.createTransaction();
createInstance(transaction, instanceName, 2);
createInstance(transaction, instanceName + 2, null);
transaction.validateConfig();
CommitStatus status = transaction.commit();
assertBeanCount(2, factory.getImplementationName());
assertStatus(status, 2, 0, 0);
}
use of org.opendaylight.controller.config.util.ConfigTransactionJMXClient in project controller by opendaylight.
the class NettyThreadgroupModuleTest method testReconfigure.
@Test
public void testReconfigure() throws InstanceAlreadyExistsException, ConflictingVersionException, ValidationException, InstanceNotFoundException {
ConfigTransactionJMXClient transaction = configRegistryClient.createTransaction();
createInstance(transaction, instanceName, null);
transaction.commit();
transaction = configRegistryClient.createTransaction();
assertBeanCount(1, factory.getImplementationName());
NettyThreadgroupModuleMXBean mxBean = transaction.newMBeanProxy(transaction.lookupConfigBean(AbstractNettyThreadgroupModuleFactory.NAME, instanceName), NettyThreadgroupModuleMXBean.class);
mxBean.setThreadCount(1);
CommitStatus status = transaction.commit();
assertBeanCount(1, factory.getImplementationName());
assertStatus(status, 0, 1, 0);
}
Aggregations