Fix LibraryModulesSchemasTest failure 77/53777/5
authorJakub Morvay <jmorvay@cisco.com>
Fri, 24 Mar 2017 08:59:11 +0000 (09:59 +0100)
committerJakub Morvay <jmorvay@cisco.com>
Fri, 24 Mar 2017 12:54:57 +0000 (13:54 +0100)
commit95452d33026b37907b541dc47006426e3b3e35ad
tree52d2ade67b415e6b6803816a3f77f7ef6926f493
parent756ff81979b5c0bcf0657517747ba5c0fdef08a4
Fix LibraryModulesSchemasTest failure

LibraryModulesSchemasTest#testCreateInvalidModulesEntries() tests
filtering invalid modules entries during resolving
ietf-netconf-yang-library/modules-state/modules node.

Resolution goes as follows. We parse xml document containing
ietf-netconf-yang-library/modules-state retrieved from the device with
help of DomToNormalizedNodeParserFactory. Then we filter invalid modules
entries from the parsed modules list node. Module entry is considered
invalid if its revision or schema url are invalid.

However, change in yangtools
https://git.opendaylight.org/gerrit/#/c/53553 causes that parsing
invalid revision will fail whole parsing xml process with unchecked
exception.

For now, do not test modules with bad revision. This is intended just as
a temporary solution. We will also need to slightly change our
ietf-netconf-yang-library/modules-state/modules node resolution logic.
Opened BUG 8071 to track that.

Change-Id: If12ae8d7bf94528088aac81e78b24058c5152283
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
netconf/sal-netconf-connector/src/main/java/org/opendaylight/netconf/sal/connect/netconf/LibraryModulesSchemas.java
netconf/sal-netconf-connector/src/test/java/org/opendaylight/netconf/sal/connect/netconf/LibraryModulesSchemasTest.java
netconf/sal-netconf-connector/src/test/resources/yang-library-fail.xml