use of org.opendaylight.controller.config.util.ConfigTransactionJMXClient in project controller by opendaylight.
the class ITTest method testInstanceAlreadyExistsException.
@Test
public void testInstanceAlreadyExistsException() throws ConflictingVersionException, ValidationException, InstanceAlreadyExistsException {
ConfigTransactionJMXClient transaction = configRegistryClient.createTransaction();
createModule(transaction, instanceName);
transaction.commit();
transaction = configRegistryClient.createTransaction();
try {
createModule(transaction, instanceName);
fail();
} catch (InstanceAlreadyExistsException e) {
}
}
use of org.opendaylight.controller.config.util.ConfigTransactionJMXClient in project controller by opendaylight.
the class GlobalEventExecutorModuleTest method testCreateBean.
@Test
public void testCreateBean() throws InstanceAlreadyExistsException, ValidationException, ConflictingVersionException {
ConfigTransactionJMXClient transaction = configRegistryClient.createTransaction();
createInstance(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 GlobalEventExecutorModuleTest method testConflictingName.
@Test
public void testConflictingName() throws Exception {
ConfigTransactionJMXClient transaction = configRegistryClient.createTransaction();
try {
createInstance(transaction, instanceName + "x");
fail();
} catch (final IllegalArgumentException e) {
assertTrue(e.getMessage() + " failure", e.getMessage().contains("only allowed name is singleton"));
}
}
use of org.opendaylight.controller.config.util.ConfigTransactionJMXClient in project controller by opendaylight.
the class GlobalEventExecutorModuleTest 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 ImmediateEventExecutorModuleTest method testCreateBean.
@Test
public void testCreateBean() throws InstanceAlreadyExistsException, ValidationException, ConflictingVersionException {
ConfigTransactionJMXClient transaction = configRegistryClient.createTransaction();
createInstance(transaction, instanceName);
transaction.validateConfig();
CommitStatus status = transaction.commit();
assertBeanCount(1, factory.getImplementationName());
assertStatus(status, 1, 0, 0);
}
Aggregations