Skip to content

Invalid tests org.edmcouncil.rdf_toolkit.writer.SortedRdfXmlWriterTest #69

@przemekgradzki

Description

@przemekgradzki

The error described in #67 was not detected in the tests because the algorithm used in them is incorrect.


How to reproduce the error:

  1. Clone the rdf-toolkit repository in the version containing issue 'xml' prefix is ​​not omitted when generating a DTD subset in a file formatted as sorted RDF/XML #67 and build project without tests:
    git clone https://github.com/edmcouncil/rdf-toolkit
    cd rdf-toolkit
    git reset --hard 2603921
    mvn -Dmaven.test.skip=true clean package
  2. Perform tests with different ordering of files in the src/test/resources/ontologies/literal directory (executed on Oracle Linux Server release 8.9 with XFS filesystem):
    1. test1.jsonld test1.rdf test1.ttl - will end with [ERROR] Tests run: 85, Failures: 4, Errors: 0, Skipped: 2, i.e. identifying issue 'xml' prefix is ​​not omitted when generating a DTD subset in a file formatted as sorted RDF/XML #67:
      mv src/test/resources/ontologies/literal/* /tmp/
      mv /tmp/test1.{jsonld,rdf,ttl} src/test/resources/ontologies/literal/
      
      # check the order of files - the following command:
      ls -f src/test/resources/ontologies/literal/
      # should return:
      #    .  ..  test1.jsonld  test1.rdf  test1.ttl
      
      mvn test
    2. test1.rdf test1.ttl test1.jsonld - will end with a BUILD SUCCESS message, which is an incorrect result because Skip adding '<!ENTITY xml "http://www.w3.org/XML/1998/namespace">' entry in sorted RDF/XML format #68 is not applied to the code yet:
      mv src/test/resources/ontologies/literal/* /tmp/
      mv /tmp/test1.{rdf,ttl,jsonld} src/test/resources/ontologies/literal/
      
      # check the order of files - the following command:
      ls -f src/test/resources/ontologies/literal/
      # should return:
      #    .  ..  test1.rdf  test1.ttl  test1.jsonld
      
      mvn test

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions