Bump yangtools to 4.0.1 04/83804/49
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 20 Aug 2019 14:37:51 +0000 (16:37 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 10 Oct 2019 09:07:01 +0000 (11:07 +0200)
This bumps yangtools to 4.0.1 as part of Magnesium MRI.

Change-Id: I1ac7d3f856af310f4e8015875223d30eac3a8276
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 files changed:
features/mdsal/odl-controller-blueprint/pom.xml
features/mdsal/odl-controller-blueprint/src/main/feature/feature.xml
features/mdsal/odl-mdsal-broker-local/pom.xml
features/mdsal/odl-mdsal-clustering-commons/pom.xml
features/mdsal/odl-mdsal-clustering-commons/src/main/feature/feature.xml
features/mdsal/odl-mdsal-distributed-datastore/pom.xml
features/mdsal/odl-mdsal-distributed-datastore/src/main/feature/feature.xml
opendaylight/blueprint/pom.xml
opendaylight/md-sal/sal-binding-dom-it/pom.xml
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/AbstractLithiumDataInput.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/AbstractLithiumDataOutput.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/AbstractMagnesiumDataInput.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/AbstractMagnesiumDataOutput.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/AbstractNormalizedNodeDataOutput.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/transformer/AbstractNormalizedNodePruner.java
opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/NormalizedNodeStreamReaderWriterTest.java
opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/SerializationUtilsTest.java
opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/datastore/node/utils/transformer/NormalizedNodePrunerTest.java
opendaylight/md-sal/sal-common-impl/src/main/java/org/opendaylight/controller/md/sal/common/impl/util/compat/DataNormalizationOperation.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DatastoreContextIntrospector.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardDataTree.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardRecoveryCoordinatorTest.java

index ec5cecc..8172e97 100644 (file)
@@ -33,7 +33,7 @@
             <dependency>
                 <groupId>org.opendaylight.yangtools</groupId>
                 <artifactId>yangtools-artifacts</artifactId>
-                <version>3.0.5</version>
+                <version>4.0.1</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
index 636ef9f..78feb3e 100644 (file)
@@ -8,7 +8,7 @@
  -->
 <features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="odl-controller-blueprint-${project.version}">
     <feature name="odl-controller-blueprint" version="${project.version}">
-        <feature version="[3,4)">odl-yangtools-codec</feature>
+        <feature version="[4,5)">odl-yangtools-codec</feature>
         <bundle start-level="40">mvn:org.opendaylight.controller/blueprint/${blueprint.version}</bundle>
     </feature>
 </features>
index 3373a7e..7dafb4d 100644 (file)
@@ -37,7 +37,7 @@
             <dependency>
                 <groupId>org.opendaylight.yangtools</groupId>
                 <artifactId>yangtools-artifacts</artifactId>
-                <version>3.0.5</version>
+                <version>4.0.1</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
index 0eeadc0..543d237 100644 (file)
@@ -29,7 +29,7 @@
             <dependency>
                 <groupId>org.opendaylight.yangtools</groupId>
                 <artifactId>yangtools-artifacts</artifactId>
-                <version>3.0.5</version>
+                <version>4.0.1</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
index 907bd59..bf6fbbe 100644 (file)
@@ -14,6 +14,6 @@
         <feature version="[6,7)">odl-apache-commons-lang3</feature>
         <feature version="[6,7)">odl-dropwizard-metrics</feature>
         <feature version="[6,7)">odl-servlet-api</feature>
-        <feature version="[3,4)">odl-yangtools-data</feature>
+        <feature version="[4,5)">odl-yangtools-data</feature>
     </feature>
 </features>
index 1501438..d07dd9d 100644 (file)
@@ -29,7 +29,7 @@
             <dependency>
                 <groupId>org.opendaylight.yangtools</groupId>
                 <artifactId>yangtools-artifacts</artifactId>
-                <version>3.0.5</version>
+                <version>4.0.1</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
index bf2fb94..089d768 100644 (file)
@@ -9,7 +9,7 @@
 <features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="odl-controller-${project.version}">
     <feature name="odl-mdsal-distributed-datastore" version="${project.version}">
         <feature version="[6,7)">odl-apache-commons-text</feature>
-        <feature version="[3,4)">odl-yangtools-codec</feature>
+        <feature version="[4,5)">odl-yangtools-codec</feature>
         <feature version="[4,5)">odl-mdsal-eos-dom</feature>
         <feature version="[4,5)">odl-mdsal-dom-broker</feature>
         <feature version="[4.0.1,5)">odl-mdsal-binding-dom-adapter</feature>
index 81071f2..e672ef1 100644 (file)
@@ -41,7 +41,7 @@
       <dependency>
         <groupId>org.opendaylight.yangtools</groupId>
         <artifactId>yangtools-artifacts</artifactId>
-        <version>3.0.5</version>
+        <version>4.0.1</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
index b1cdac6..21cf3df 100644 (file)
@@ -18,7 +18,7 @@
       <dependency>
         <groupId>org.opendaylight.yangtools</groupId>
         <artifactId>yangtools-artifacts</artifactId>
-        <version>3.0.5</version>
+        <version>4.0.1</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
index 3ef0def..d921076 100644 (file)
@@ -114,9 +114,12 @@ abstract class AbstractLithiumDataInput extends AbstractNormalizedNodeDataInput
     private void streamAnyxml(final NormalizedNodeStreamWriter writer) throws IOException {
         final NodeIdentifier identifier = readNodeIdentifier();
         LOG.trace("Streaming anyxml node {}", identifier);
-        writer.startAnyxmlNode(identifier);
-        writer.domSourceValue(readDOMSource());
-        writer.endNode();
+
+        final DOMSource value = readDOMSource();
+        if (writer.startAnyxmlNode(identifier, DOMSource.class)) {
+            writer.domSourceValue(value);
+            writer.endNode();
+        }
     }
 
     private void streamAugmentation(final NormalizedNodeStreamWriter writer) throws IOException {
index 95c62fc..25e14b1 100644 (file)
@@ -179,10 +179,14 @@ abstract class AbstractLithiumDataOutput extends AbstractNormalizedNodeDataOutpu
     }
 
     @Override
-    public final void startAnyxmlNode(final NodeIdentifier name) throws IOException {
-        LOG.trace("Starting any xml node");
-        startNode(name, LithiumNode.ANY_XML_NODE);
-        inSimple = true;
+    public final boolean startAnyxmlNode(final NodeIdentifier name, final Class<?> objectModel) throws IOException {
+        if (DOMSource.class.isAssignableFrom(objectModel)) {
+            LOG.trace("Starting anyxml node");
+            startNode(name, LithiumNode.ANY_XML_NODE);
+            inSimple = true;
+            return true;
+        }
+        return false;
     }
 
     @Override
index 1ea8917..d8302e5 100644 (file)
@@ -137,9 +137,12 @@ abstract class AbstractMagnesiumDataInput extends AbstractNormalizedNodeDataInpu
     private void streamAnyxml(final NormalizedNodeStreamWriter writer, final byte nodeHeader) throws IOException {
         final NodeIdentifier identifier = decodeNodeIdentifier(nodeHeader);
         LOG.trace("Streaming anyxml node {}", identifier);
-        writer.startAnyxmlNode(identifier);
-        writer.domSourceValue(readDOMSource());
-        writer.endNode();
+
+        final DOMSource value = readDOMSource();
+        if (writer.startAnyxmlNode(identifier, DOMSource.class)) {
+            writer.domSourceValue(value);
+            writer.endNode();
+        }
     }
 
     private void streamAnyxmlModeled(final NormalizedNodeStreamWriter writer, final byte nodeHeader)
index c0dfb1b..3f28f06 100644 (file)
@@ -180,8 +180,12 @@ abstract class AbstractMagnesiumDataOutput extends AbstractNormalizedNodeDataOut
     }
 
     @Override
-    public final void startAnyxmlNode(final NodeIdentifier name) throws IOException {
-        startSimpleNode(MagnesiumNode.NODE_ANYXML, name);
+    public final boolean startAnyxmlNode(final NodeIdentifier name, final Class<?> objectModel) throws IOException {
+        if (DOMSource.class.isAssignableFrom(objectModel)) {
+            startSimpleNode(MagnesiumNode.NODE_ANYXML, name);
+            return true;
+        }
+        return false;
     }
 
     @Override
index 7907fcf..d8e021f 100755 (executable)
@@ -16,6 +16,7 @@ import java.util.List;
 import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
+import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 import org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter;
@@ -186,6 +187,12 @@ abstract class AbstractNormalizedNodeDataOutput implements NormalizedNodeDataOut
         }
     }
 
+    @Override
+    public final boolean startAnydataNode(final NodeIdentifier name, final Class<?> objectModel) throws IOException {
+        // FIXME: We do not support anydata nodes of any kind, yet
+        return false;
+    }
+
     abstract short streamVersion();
 
     abstract void writeQNameInternal(@NonNull QName qname) throws IOException;
index c3628ad..d6d409c 100644 (file)
@@ -8,6 +8,7 @@
 package org.opendaylight.controller.cluster.datastore.node.utils.transformer;
 
 import static com.google.common.base.Preconditions.checkState;
+import static com.google.common.base.Verify.verify;
 import static java.util.Objects.requireNonNull;
 
 import java.io.IOException;
@@ -158,8 +159,18 @@ abstract class AbstractNormalizedNodePruner implements NormalizedNodeStreamWrite
     }
 
     @Override
-    public void startAnyxmlNode(final NodeIdentifier name) throws IOException {
-        enter(ReusableImmutableNormalizedNodeStreamWriter::startAnyxmlNode, name);
+    public boolean startAnyxmlNode(final NodeIdentifier name, final Class<?> objectModel) throws IOException {
+        if (enter(name)) {
+            verify(delegate.startAnyxmlNode(name, objectModel),
+                "Unexpected failure to stream DOMSource node %s model %s", name, objectModel);
+        }
+        return true;
+    }
+
+    @Override
+    public boolean startAnydataNode(final NodeIdentifier name, final Class<?> objectModel) throws IOException {
+        // FIXME: we do not support anydata nodes yet
+        return false;
     }
 
     @Override
index 4b45af4..1e57eb4 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.controller.cluster.datastore.node.utils.stream;
 
 import static org.junit.Assert.assertEquals;
@@ -33,8 +32,8 @@ import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdent
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeWithValue;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
-import org.opendaylight.yangtools.yang.data.api.schema.AnyXmlNode;
 import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
+import org.opendaylight.yangtools.yang.data.api.schema.DOMSourceAnyxmlNode;
 import org.opendaylight.yangtools.yang.data.api.schema.DataContainerChild;
 import org.opendaylight.yangtools.yang.data.api.schema.LeafSetEntryNode;
 import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode;
@@ -220,10 +219,11 @@ public class NormalizedNodeStreamReaderWriterTest {
         StreamResult xmlOutput = new StreamResult(new StringWriter());
         Transformer transformer = TransformerFactory.newInstance().newTransformer();
         transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
-        transformer.transform(((AnyXmlNode)child.get()).getValue(), xmlOutput);
+        transformer.transform(((DOMSourceAnyxmlNode)child.get()).getValue(), xmlOutput);
 
         assertEquals("XML", xml, xmlOutput.getWriter().toString());
-        assertEquals("http://www.w3.org/TR/html4/", ((AnyXmlNode)child.get()).getValue().getNode().getNamespaceURI());
+        assertEquals("http://www.w3.org/TR/html4/",
+            ((DOMSourceAnyxmlNode)child.get()).getValue().getNode().getNamespaceURI());
     }
 
     @Test
index 610a232..04da2a6 100644 (file)
@@ -30,9 +30,9 @@ import org.opendaylight.yangtools.util.xml.UntrustedXML;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.AugmentationIdentifier;
-import org.opendaylight.yangtools.yang.data.api.schema.AnyXmlNode;
 import org.opendaylight.yangtools.yang.data.api.schema.AugmentationNode;
 import org.opendaylight.yangtools.yang.data.api.schema.ChoiceNode;
+import org.opendaylight.yangtools.yang.data.api.schema.DOMSourceAnyxmlNode;
 import org.opendaylight.yangtools.yang.data.api.schema.LeafNode;
 import org.opendaylight.yangtools.yang.data.api.schema.LeafSetEntryNode;
 import org.opendaylight.yangtools.yang.data.api.schema.LeafSetNode;
@@ -63,7 +63,7 @@ public class SerializationUtilsTest {
         final ByteArrayInputStream is =
                 new ByteArrayInputStream("<xml><data/></xml>".getBytes(Charset.defaultCharset()));
         final Document parse = UntrustedXML.newDocumentBuilder().parse(is);
-        final AnyXmlNode anyXmlNode = Builders.anyXmlBuilder()
+        final DOMSourceAnyxmlNode anyXmlNode = Builders.anyXmlBuilder()
                 .withNodeIdentifier(id("anyXmlNode"))
                 .withValue(new DOMSource(parse))
                 .build();
index f15b184..50ade78 100644 (file)
@@ -30,7 +30,7 @@ import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.AugmentationIdentifier;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeWithValue;
-import org.opendaylight.yangtools.yang.data.api.schema.AnyXmlNode;
+import org.opendaylight.yangtools.yang.data.api.schema.DOMSourceAnyxmlNode;
 import org.opendaylight.yangtools.yang.data.api.schema.LeafNode;
 import org.opendaylight.yangtools.yang.data.api.schema.LeafSetEntryNode;
 import org.opendaylight.yangtools.yang.data.api.schema.MapNode;
@@ -257,7 +257,7 @@ public class NormalizedNodePrunerTest {
     @Test
     public void testAnyXMLNodeNotPrunedWhenHasParent() throws IOException {
         NormalizedNodePruner pruner = prunerFullSchema(TestModel.TEST_PATH);
-        AnyXmlNode child = Builders.anyXmlBuilder().withNodeIdentifier(
+        DOMSourceAnyxmlNode child = Builders.anyXmlBuilder().withNodeIdentifier(
                 new NodeIdentifier(TestModel.ANY_XML_QNAME)).withValue(mock(DOMSource.class)).build();
         NormalizedNode<?, ?> input = Builders.containerBuilder().withNodeIdentifier(
                 new NodeIdentifier(TestModel.TEST_QNAME)).withChild(child).build();
index 4dbd7db..7a23882 100644 (file)
@@ -32,7 +32,7 @@ import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 import org.opendaylight.yangtools.yang.data.impl.schema.Builders;
 import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.DataContainerNodeBuilder;
-import org.opendaylight.yangtools.yang.model.api.AnyXmlSchemaNode;
+import org.opendaylight.yangtools.yang.model.api.AnyxmlSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.AugmentationSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.AugmentationTarget;
 import org.opendaylight.yangtools.yang.model.api.CaseSchemaNode;
@@ -483,8 +483,8 @@ public abstract class DataNormalizationOperation<T extends PathArgument> impleme
         }
     }
 
-    private static class AnyXmlNormalization extends DataNormalizationOperation<NodeIdentifier> {
-        AnyXmlNormalization(final AnyXmlSchemaNode schema) {
+    private static class AnyxmlNormalization extends DataNormalizationOperation<NodeIdentifier> {
+        AnyxmlNormalization(final AnyxmlSchemaNode schema) {
             super(new NodeIdentifier(schema.getQName()), schema);
         }
 
@@ -574,8 +574,8 @@ public abstract class DataNormalizationOperation<T extends PathArgument> impleme
             return new ChoiceNodeNormalization((ChoiceSchemaNode) potential);
         } else if (potential instanceof LeafListSchemaNode) {
             return fromLeafListSchemaNode((LeafListSchemaNode) potential);
-        } else if (potential instanceof AnyXmlSchemaNode) {
-            return new AnyXmlNormalization((AnyXmlSchemaNode) potential);
+        } else if (potential instanceof AnyxmlSchemaNode) {
+            return new AnyxmlNormalization((AnyxmlSchemaNode) potential);
         }
         return null;
     }
index 93aee0d..f22a98a 100644 (file)
@@ -29,6 +29,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
+import java.util.function.Function;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.text.WordUtils;
 import org.checkerframework.checker.lock.qual.GuardedBy;
@@ -39,6 +40,10 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controll
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.distributed.datastore.provider.rev140612.DataStorePropertiesContainer;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.common.QName;
+import org.opendaylight.yangtools.yang.common.Uint16;
+import org.opendaylight.yangtools.yang.common.Uint32;
+import org.opendaylight.yangtools.yang.common.Uint64;
+import org.opendaylight.yangtools.yang.common.Uint8;
 import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -59,6 +64,14 @@ public class DatastoreContextIntrospector {
 
     private static final Map<String, Method> BUILDER_SETTERS = new HashMap<>();
 
+    private static final ImmutableMap<Class<?>, Function<String, Object>> UINT_FACTORIES =
+            ImmutableMap.<Class<?>, Function<String, Object>>builder()
+            .put(Uint8.class, Uint8::valueOf)
+            .put(Uint16.class, Uint16::valueOf)
+            .put(Uint32.class, Uint32::valueOf)
+            .put(Uint64.class, Uint64::valueOf)
+            .build();
+
     static {
         try {
             introspectDatastoreContextBuilder();
@@ -393,13 +406,18 @@ public class DatastoreContextIntrospector {
         }
 
         final Constructor<?> ctor = CONSTRUCTORS.get(toType);
-
-        LOG.trace("Found {}", ctor);
-
         if (ctor == null) {
+            if (fromValue instanceof String) {
+                final Function<String, Object> factory = UINT_FACTORIES.get(toType);
+                if (factory != null) {
+                    return factory.apply((String) fromValue);
+                }
+            }
+
             throw new IllegalArgumentException(String.format("Constructor not found for type %s", toType));
         }
 
+        LOG.trace("Found {}", ctor);
         Object value = fromValue;
 
         // Once we find a constructor that takes the original type as an argument, we're done recursing.
index 614a346..43a3f6d 100644 (file)
@@ -945,7 +945,7 @@ public class ShardDataTree extends ShardDataTreeTransactionParent {
         try {
             candidate = tip.prepare(cohort.getDataTreeModification());
             LOG.debug("{}: Transaction {} candidate ready", logContext, currentId);
-        } catch (RuntimeException e) {
+        } catch (DataValidationFailedException | RuntimeException e) {
             failPreCommit(e);
             return;
         }
index 0b78e32..4ad48a1 100644 (file)
@@ -29,6 +29,7 @@ import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidate;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeConfiguration;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeSnapshot;
+import org.opendaylight.yangtools.yang.data.api.schema.tree.DataValidationFailedException;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.TreeType;
 import org.opendaylight.yangtools.yang.data.impl.schema.tree.InMemoryDataTreeFactory;
 import org.opendaylight.yangtools.yang.data.impl.schema.tree.SchemaValidationFailedException;
@@ -57,7 +58,8 @@ public class ShardRecoveryCoordinatorTest extends AbstractTest {
     }
 
     @Test
-    public void testAppendRecoveredLogEntryCommitTransactionPayload() throws IOException {
+    public void testAppendRecoveredLogEntryCommitTransactionPayload() throws IOException,
+            DataValidationFailedException {
         try {
             coordinator.appendRecoveredLogEntry(CommitTransactionPayload.create(nextTransactionId(), createCar()));
         } catch (final SchemaValidationFailedException e) {
@@ -68,7 +70,7 @@ public class ShardRecoveryCoordinatorTest extends AbstractTest {
     }
 
     @Test
-    public void testApplyRecoverySnapshot() {
+    public void testApplyRecoverySnapshot() throws DataValidationFailedException {
         coordinator.applyRecoverySnapshot(createSnapshot());
 
         assertFalse(readCars(peopleDataTree).isPresent());
@@ -85,7 +87,7 @@ public class ShardRecoveryCoordinatorTest extends AbstractTest {
         }
     }
 
-    private DataTreeCandidate createCar() {
+    private DataTreeCandidate createCar() throws DataValidationFailedException {
         final DataTree dataTree = new InMemoryDataTreeFactory().create(
             DataTreeConfiguration.DEFAULT_OPERATIONAL, carsSchemaContext);
 
@@ -114,7 +116,7 @@ public class ShardRecoveryCoordinatorTest extends AbstractTest {
         return shardDataTree.readNode(PeopleModel.BASE_PATH);
     }
 
-    private static ShardSnapshotState createSnapshot() {
+    private static ShardSnapshotState createSnapshot() throws DataValidationFailedException {
         final DataTree dataTree = new InMemoryDataTreeFactory().create(
             DataTreeConfiguration.DEFAULT_OPERATIONAL, SchemaContextHelper.select(SchemaContextHelper.CARS_YANG,
                 SchemaContextHelper.PEOPLE_YANG));

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.