Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
przemekgradzki opened this issue Mar 14, 2024 · 0 comments
Assignees
Labels

Comments

@przemekgradzki
Copy link
Contributor

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants