import org.junit.Test;
import org.opendaylight.controller.cluster.datastore.identifiers.ShardIdentifier;
import org.opendaylight.controller.cluster.datastore.messages.CreateTransaction;
import org.junit.Test;
import org.opendaylight.controller.cluster.datastore.identifiers.ShardIdentifier;
import org.opendaylight.controller.cluster.datastore.messages.CreateTransaction;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
public class ShardTest extends AbstractActorTest {
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
public class ShardTest extends AbstractActorTest {
protected String match(Object in) {
if (in.getClass().equals(CreateTransactionChainReply.SERIALIZABLE_CLASS)){
CreateTransactionChainReply reply =
protected String match(Object in) {
if (in.getClass().equals(CreateTransactionChainReply.SERIALIZABLE_CLASS)){
CreateTransactionChainReply reply =
protected Boolean match(Object in) {
if(in instanceof EnableNotification){
return ((EnableNotification) in).isEnabled();
protected Boolean match(Object in) {
if(in instanceof EnableNotification){
return ((EnableNotification) in).isEnabled();
protected String match(Object in) {
if (in.getClass().equals(RegisterChangeListenerReply.class)) {
RegisterChangeListenerReply reply =
protected String match(Object in) {
if (in.getClass().equals(RegisterChangeListenerReply.class)) {
RegisterChangeListenerReply reply =
// Wait for a specific log message to show up
final boolean result =
new JavaTestKit.EventFilter<Boolean>(Logging.Info.class
) {
// Wait for a specific log message to show up
final boolean result =
new JavaTestKit.EventFilter<Boolean>(Logging.Info.class
) {
subject.tell(new CreateTransaction("txn-1", TransactionProxy.TransactionType.READ_ONLY.ordinal() ).toSerializable(),
getRef());
subject.tell(new CreateTransaction("txn-1", TransactionProxy.TransactionType.READ_ONLY.ordinal() ).toSerializable(),
getRef());
protected String match(Object in) {
if (in instanceof CreateTransactionReply) {
CreateTransactionReply reply =
protected String match(Object in) {
if (in instanceof CreateTransactionReply) {
CreateTransactionReply reply =
.shardName("inventory").type("config").build();
peerAddresses.put(identifier, null);
.shardName("inventory").type("config").build();
peerAddresses.put(identifier, null);