import java.util.Set;
import org.junit.Test;
import org.opendaylight.controller.cluster.datastore.AbstractShardTest;
+import org.opendaylight.controller.cluster.datastore.DataStoreVersions;
import org.opendaylight.controller.cluster.datastore.Shard;
import org.opendaylight.controller.cluster.datastore.ShardTestKit;
import org.opendaylight.controller.cluster.datastore.modification.MergeModification;
import org.opendaylight.controller.cluster.raft.utils.InMemorySnapshotStore;
import org.opendaylight.controller.md.cluster.datastore.model.TestModel;
import org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages;
+import org.opendaylight.yangtools.util.StringIdentifier;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree;
public class PreLithiumShardTest extends AbstractShardTest {
private static CompositeModificationPayload newLegacyPayload(final Modification... mods) {
- MutableCompositeModification compMod = new MutableCompositeModification();
+ MutableCompositeModification compMod = new MutableCompositeModification(DataStoreVersions.HELIUM_2_VERSION);
for(Modification mod: mods) {
compMod.addModification(mod);
}
}
private static CompositeModificationByteStringPayload newLegacyByteStringPayload(final Modification... mods) {
- MutableCompositeModification compMod = new MutableCompositeModification();
+ MutableCompositeModification compMod = new MutableCompositeModification(DataStoreVersions.HELIUM_2_VERSION);
for(Modification mod: mods) {
compMod.addModification(mod);
}
NormalizedNode<?, ?> node = ImmutableNodes.containerNode(TestModel.TEST_QNAME);
- ApplyState applyState = new ApplyState(null, "test", new ReplicatedLogImplEntry(1, 2,
+ ApplyState applyState = new ApplyState(null, new StringIdentifier("test"),
+ new ReplicatedLogImplEntry(1, 2,
newLegacyByteStringPayload(new WriteModification(TestModel.TEST_PATH, node))));
shard.underlyingActor().onReceiveCommand(applyState);