Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Bug 499: Initial draft of in-memory datastore and data broker"
[controller.git]
/
opendaylight
/
config
/
config-manager
/
src
/
test
/
java
/
org
/
opendaylight
/
controller
/
config
/
manager
/
testingservices
/
threadpool
/
test
/
SimpleConfigurationTest.java
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 441de36db07655558a3f882e7ebbb9ba929e964f..9852a45853b1fad9f0bbd9ab4e3011bb06f8d29b 100644
(file)
--- 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
@@
-30,7
+30,6
@@
import javax.management.InstanceNotFoundException;
import javax.management.MBeanException;
import javax.management.ObjectName;
import javax.management.ReflectionException;
import javax.management.MBeanException;
import javax.management.ObjectName;
import javax.management.ReflectionException;
-import javax.management.RuntimeMBeanException;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
@@
-135,7
+134,7
@@
public class SimpleConfigurationTest extends AbstractConfigTest {
private void testValidation(ConfigTransactionClient transaction)
throws InstanceAlreadyExistsException, ReflectionException,
private void testValidation(ConfigTransactionClient transaction)
throws InstanceAlreadyExistsException, ReflectionException,
- InstanceNotFoundException, MBeanException {
+ InstanceNotFoundException, MBeanException
, ConflictingVersionException
{
ObjectName fixed1names = transaction.createModule(
TestingFixedThreadPoolModuleFactory.NAME, fixed1);
// call validate on config bean
ObjectName fixed1names = transaction.createModule(
TestingFixedThreadPoolModuleFactory.NAME, fixed1);
// call validate on config bean
@@
-143,8
+142,8
@@
public class SimpleConfigurationTest extends AbstractConfigTest {
platformMBeanServer.invoke(fixed1names, "validate", new Object[0],
new String[0]);
fail();
platformMBeanServer.invoke(fixed1names, "validate", new Object[0],
new String[0]);
fail();
- } catch (
Runtime
MBeanException e) {
-
Runtime
Exception targetException = e.getTargetException();
+ } catch (MBeanException e) {
+ Exception targetException = e.getTargetException();
assertNotNull(targetException);
assertEquals(ValidationException.class, targetException.getClass());
}
assertNotNull(targetException);
assertEquals(ValidationException.class, targetException.getClass());
}
@@
-327,26
+326,18
@@
public class SimpleConfigurationTest extends AbstractConfigTest {
}
@Test
}
@Test
- public void testAbort() {
+ public void testAbort()
throws Exception
{
ConfigTransactionJMXClient transaction = configRegistryClient
.createTransaction();
assertEquals(1, configRegistryClient.getOpenConfigs().size());
transaction.abortConfig();
ConfigTransactionJMXClient transaction = configRegistryClient
.createTransaction();
assertEquals(1, configRegistryClient.getOpenConfigs().size());
transaction.abortConfig();
+ assertEquals(0, configRegistryClient.getOpenConfigs().size());
try {
try {
- transaction.createModule(TestingFixedThreadPoolModuleFactory.NAME,
- fixed1);
- fail();
- } catch (Exception e) {
- assertTrue(e.getCause() instanceof InstanceNotFoundException);
- }
- try {
- transaction.validateConfig();
+ platformMBeanServer.getMBeanInfo(transaction.getObjectName());
fail();
fail();
- } catch (Exception e) {
- assertTrue(e.getCause() instanceof InstanceNotFoundException);
+ }catch(InstanceNotFoundException e){
}
}
- assertEquals(0, configRegistryClient.getOpenConfigs().size());
}
@Test
}
@Test