import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
-import org.opendaylight.controller.md.sal.dom.api.DOMRpcIdentifier;
-import org.opendaylight.controller.remote.rpc.RemoteRpcProviderConfig;
+import org.opendaylight.controller.remote.rpc.RemoteOpsProviderConfig;
import org.opendaylight.controller.remote.rpc.registry.RpcRegistry;
import org.opendaylight.controller.remote.rpc.registry.gossip.BucketStoreAccess;
+import org.opendaylight.mdsal.dom.api.DOMRpcIdentifier;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
import org.opendaylight.yangtools.yang.model.api.SchemaPath;
private RemoteRpcRegistryMXBeanImpl mxBean;
@Before
- public void setUp() throws Exception {
+ public void setUp() {
system = ActorSystem.create("test");
final DOMRpcIdentifier emptyRpcIdentifier = DOMRpcIdentifier.create(
buckets = Lists.newArrayList(emptyRpcIdentifier, localRpcIdentifier);
- final RemoteRpcProviderConfig config = new RemoteRpcProviderConfig.Builder("system").build();
+ final RemoteOpsProviderConfig config = new RemoteOpsProviderConfig.Builder("system").build();
final TestKit invoker = new TestKit(system);
final TestKit registrar = new TestKit(system);
final TestKit supervisor = new TestKit(system);
}
@After
- public void tearDown() throws Exception {
+ public void tearDown() {
TestKit.shutdownActorSystem(system, Boolean.TRUE);
}
@Test
- public void testGetGlobalRpcEmptyBuckets() throws Exception {
+ public void testGetGlobalRpcEmptyBuckets() {
final Set<String> globalRpc = mxBean.getGlobalRpc();
Assert.assertNotNull(globalRpc);
}
@Test
- public void testGetGlobalRpc() throws Exception {
+ public void testGetGlobalRpc() {
testActor.tell(new RpcRegistry.Messages.AddOrUpdateRoutes(Lists.newArrayList(buckets)), ActorRef.noSender());
final Set<String> globalRpc = mxBean.getGlobalRpc();
}
@Test
- public void testGetLocalRegisteredRoutedRpcEmptyBuckets() throws Exception {
+ public void testGetLocalRegisteredRoutedRpcEmptyBuckets() {
final Set<String> localRegisteredRoutedRpc = mxBean.getLocalRegisteredRoutedRpc();
Assert.assertNotNull(localRegisteredRoutedRpc);
}
@Test
- public void testGetLocalRegisteredRoutedRpc() throws Exception {
+ public void testGetLocalRegisteredRoutedRpc() {
testActor.tell(new RpcRegistry.Messages.AddOrUpdateRoutes(Lists.newArrayList(buckets)), ActorRef.noSender());
final Set<String> localRegisteredRoutedRpc = mxBean.getLocalRegisteredRoutedRpc();
}
@Test
- public void testFindRpcByNameEmptyBuckets() throws Exception {
+ public void testFindRpcByNameEmptyBuckets() {
final Map<String, String> rpcByName = mxBean.findRpcByName("");
Assert.assertNotNull(rpcByName);
}
@Test
- public void testFindRpcByName() throws Exception {
+ public void testFindRpcByName() {
testActor.tell(new RpcRegistry.Messages.AddOrUpdateRoutes(Lists.newArrayList(buckets)), ActorRef.noSender());
final Map<String, String> rpcByName = mxBean.findRpcByName("");
}
@Test
- public void testFindRpcByRouteEmptyBuckets() throws Exception {
+ public void testFindRpcByRouteEmptyBuckets() {
final Map<String, String> rpcByRoute = mxBean.findRpcByRoute("");
Assert.assertNotNull(rpcByRoute);
}
@Test
- public void testFindRpcByRoute() throws Exception {
+ public void testFindRpcByRoute() {
testActor.tell(new RpcRegistry.Messages.AddOrUpdateRoutes(Lists.newArrayList(buckets)), ActorRef.noSender());
final Map<String, String> rpcByRoute = mxBean.findRpcByRoute("");
}
@Test
- public void testGetBucketVersionsEmptyBuckets() throws Exception {
+ public void testGetBucketVersionsEmptyBuckets() {
final String bucketVersions = mxBean.getBucketVersions();
Assert.assertEquals(Collections.EMPTY_MAP.toString(), bucketVersions);
}
@Test
- public void testGetBucketVersions() throws Exception {
+ public void testGetBucketVersions() {
testActor.tell(new RpcRegistry.Messages.AddOrUpdateRoutes(Lists.newArrayList(buckets)), ActorRef.noSender());
final String bucketVersions = mxBean.getBucketVersions();