import org.junit.BeforeClass;
import org.junit.Test;
import org.mockito.Mockito;
+import org.opendaylight.controller.cluster.databroker.ConcurrentDOMDataBroker;
import org.opendaylight.controller.cluster.datastore.exceptions.NoShardLeaderException;
import org.opendaylight.controller.cluster.datastore.exceptions.NotInitializedException;
import org.opendaylight.controller.cluster.datastore.messages.DatastoreSnapshot;
import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode;
import org.opendaylight.yangtools.yang.data.api.schema.MapNode;
import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
+import org.opendaylight.yangtools.yang.data.api.schema.tree.TreeType;
import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes;
import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableContainerNodeBuilder;
CountDownLatch blockRecoveryLatch = new CountDownLatch(1);
InMemoryJournal.addBlockReadMessagesLatch(persistentID, blockRecoveryLatch);
+ InMemoryJournal.addEntry(persistentID, 1, "Dummy data so akka will read from persistence");
+
DistributedDataStore dataStore = setupDistributedDataStore(testName, false, shardName);
// Create the write Tx
CountDownLatch blockRecoveryLatch = new CountDownLatch(1);
InMemoryJournal.addBlockReadMessagesLatch(persistentID, blockRecoveryLatch);
+ InMemoryJournal.addEntry(persistentID, 1, "Dummy data so akka will read from persistence");
+
DistributedDataStore dataStore = setupDistributedDataStore(testName, false, shardName);
// Create the read-write Tx
CarsModel.newCarEntry("optima", BigInteger.valueOf(20000L)),
CarsModel.newCarEntry("sportage", BigInteger.valueOf(30000L))));
- ShardDataTree dataTree = new ShardDataTree(SchemaContextHelper.full());
+ ShardDataTree dataTree = new ShardDataTree(SchemaContextHelper.full(), TreeType.OPERATIONAL);
AbstractShardTest.writeToStore(dataTree, CarsModel.BASE_PATH, carsNode);
NormalizedNode<?, ?> root = AbstractShardTest.readStore(dataTree.getDataTree(),
YangInstanceIdentifier.builder().build());
Collections.<ReplicatedLogEntry>emptyList(), 2, 1, 2, 1, 1, "member-1");
NormalizedNode<?, ?> peopleNode = PeopleModel.create();
- dataTree = new ShardDataTree(SchemaContextHelper.full());
+ dataTree = new ShardDataTree(SchemaContextHelper.full(), TreeType.OPERATIONAL);
AbstractShardTest.writeToStore(dataTree, PeopleModel.BASE_PATH, peopleNode);
root = AbstractShardTest.readStore(dataTree.getDataTree(), YangInstanceIdentifier.builder().build());