import org.opendaylight.controller.cluster.datastore.messages.RemotePrimaryShardFound;
import org.opendaylight.controller.cluster.raft.utils.EchoActor;
import org.opendaylight.controller.cluster.raft.utils.MessageCollectorActor;
-import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
+import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
this.actorRef = actorRef;
}
- @Override public void onReceive(final Object message) throws Exception {
+ @Override public void onReceive(final Object message) {
if (message instanceof FindPrimary) {
FindPrimary fp = (FindPrimary)message;
Object resp = findPrimaryResponses.get(fp.getShardName());
}
@Override
- public MockShardManager create() throws Exception {
+ public MockShardManager create() {
return new MockShardManager(found, actorRef);
}
}
}
@Test
- public void testFindPrimaryShardAsyncPrimaryNotFound() throws Exception {
+ public void testFindPrimaryShardAsyncPrimaryNotFound() {
testFindPrimaryExceptions(new PrimaryNotFoundException("not found"));
}
@Test
- public void testFindPrimaryShardAsyncActorNotInitialized() throws Exception {
+ public void testFindPrimaryShardAsyncActorNotInitialized() {
testFindPrimaryExceptions(new NotInitializedException("not initialized"));
}
@SuppressWarnings("checkstyle:IllegalCatch")
- private static void testFindPrimaryExceptions(final Object expectedException) throws Exception {
+ private static void testFindPrimaryExceptions(final Object expectedException) {
ActorRef shardManager = getSystem().actorOf(MessageCollectorActor.props());
DatastoreContext dataStoreContext = DatastoreContext.newBuilder()