buda-base / lds-pdi

http://purl.bdrc.io BDRC Linked Data Server
Apache License 2.0
2 stars 0 forks source link

unit tests not passing #49

Closed eroux closed 6 years ago

eroux commented 6 years ago

mvn test doesn't pass, here are some highlights from the console:

Running io.bdrc.ldspdi.test.LdsTest
java.nio.file.NoSuchFileException: /home/marc/lds-queries/public/prefixes.txt
    at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
    at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
    at java.nio.file.Files.newByteChannel(Files.java:361)
    at java.nio.file.Files.newByteChannel(Files.java:407)
    at java.nio.file.Files.readAllBytes(Files.java:3152)
    at io.bdrc.ldspdi.service.ServiceConfig.initForTests(ServiceConfig.java:87)
[main] ERROR org.apache.jena.riot - loading remote context failed: http://purl.bdrc.io/context.jsonld
org.apache.jena.riot.RiotException: loading remote context failed: http://purl.bdrc.io/context.jsonld
    at org.apache.jena.riot.system.ErrorHandlerFactory$ErrorHandlerStd.error(ErrorHandlerFactory.java:140)
    at org.apache.jena.riot.lang.JsonLDReader.read$(JsonLDReader.java:162)
    at org.apache.jena.riot.lang.JsonLDReader.read(JsonLDReader.java:101)
    at org.apache.jena.riot.RDFParser.read(RDFParser.java:352)
    at org.apache.jena.riot.RDFParser.parseURI(RDFParser.java:321)
    at org.apache.jena.riot.RDFParser.parse(RDFParser.java:295)
    at org.apache.jena.riot.RDFParserBuilder.parse(RDFParserBuilder.java:500)
    at io.bdrc.ldspdi.test.LdsTest.getModelFromFileName(LdsTest.java:321)
    at io.bdrc.ldspdi.test.LdsTest.testJSONLDFormatter(LdsTest.java:211)
MarcAgate commented 6 years ago

using mvn -Dtest="io.bdrc/ldspdi/test/**" test

I get:

Results :
Tests run: 12, Failures: 0, Errors: 0, Skipped: 0 

I therefore cannot reproduce the issue. Re-pushing...

MarcAgate commented 6 years ago

Obviously, I couldn't reproduce the issue... since the failing path was my local path :grin: Fixed it.

eroux commented 6 years ago

Thanks! I still have an error in mvn test on my machine:

Running io.bdrc.ldspdi.test.LdsTest
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.047 sec <<< FAILURE! - in io.bdrc.ldspdi.test.LdsTest
io.bdrc.ldspdi.test.LdsTest  Time elapsed: 0.047 sec  <<< ERROR!
java.lang.NullPointerException: null
    at io.bdrc.ldspdi.service.ServiceConfig.initForTests(ServiceConfig.java:87)
    at io.bdrc.ldspdi.test.LdsTest.init(LdsTest.java:94)

io.bdrc.ldspdi.test.LdsTest  Time elapsed: 0.047 sec  <<< ERROR!
java.lang.NullPointerException: null
    at io.bdrc.ldspdi.test.LdsTest.close(LdsTest.java:108)
MarcAgate commented 6 years ago

Fixed as of commit 25f7b13

MarcAgate commented 6 years ago

Resolved by commit ce9f7e6