Visitar URL original
New W3C json-ld-api test structure does not run · Issue #262 · jsonld-java/jsonld-java · GitHub
Skip to content

New W3C json-ld-api test structure does not run #262

Open

Description

@RinkeHoekstra

The JSON-LD 1.1 tests at https://github.com/w3c/json-ld-api/tree/master/tests use manifests with an additional layer of nesting: there's a file called manifest.jsonld that contains a list of manifest files, rather than a list of test objects. This breaks the JsonLdProcessor tests as it tries to process all manifest files and expects the latter structure: a list of test objects.

-------------------------------------------------------------------------------
Test set: com.github.jsonldjava.core.JsonLdProcessorTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.063 s <<< FAILURE! - in com.github.jsonldjava.core.JsonLdProcessorTest
initializationError(com.github.jsonldjava.core.JsonLdProcessorTest)  Time elapsed: 0.025 s  <<< ERROR!
java.lang.ClassCastException: class java.lang.String cannot be cast to class java.util.Map (java.lang.String and java.util.Map are in module java.base of loader 'bootstrap')
	at com.github.jsonldjava.core.JsonLdProcessorTest.data(JsonLdProcessorTest.java:212)

Solution: either explicitly exclude manifest.jsonld from the processing, or explicitly start with that file to find the "normal" manifest files.

Activity

  1. RinkeHoekstra commented on Jun 21, 2019

    @RinkeHoekstra
    Author

    I can confirm that excluding the manifest.jsonld explicitly will make the tests run (though very many of them fail).

  2. ansell commented on Jun 26, 2019

    @ansell
    Member

    The test suite here is based on the original structure at https://github.com/json-ld/json-ld.org/blob/master/test-suite/tests/toRdf-manifest.jsonld If you can migrate the test parsing/running code over and send a Pull Request that would be great.

  3. added a commit that references this issue on Jun 27, 2019
  4. RinkeHoekstra commented on Jun 27, 2019

    @RinkeHoekstra
    Author

    @ansell ok, did my best :-)

    The tests now run with a copy of the W3C test suite for JSON-LD 1.1

    As the comments in the code already said, ideally these tests would be pulled automatically from that repository. Perhaps an intermediate solution would be to configure a submodule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions