sparql.anything
sparql.anything copied to clipboard
Maven Build Failure on Windows 10 (Bug)
When running "mvn install" on the sparql.anything directory the following is obtained:
Results:
Failed tests: testWithOnDiskGraph1(com.github.sparqlanything.csv.CSVTriplifierTest): expected 21 quads but found 34 testWithOnDiskGraph2(com.github.sparqlanything.csv.CSVTriplifierTest): expected 13 quads but found 34
Attached below the full test report from the Powershell: TestPrintOutSPARQLAny.txt
I made a change on the test, can you please try again after updating your working copy with git pull
?
I realized I only changed one of the two tests in the first commit! Now it's time to try again :)
I have just re-run the test after pulling the latest commit but it still fails the second test unfortunately:
Results :
Failed tests: testWithOnDiskGraph2(com.github.sparqlanything.csv.CSVTriplifierTest): expected 13 quads but found 34
Please see the attachment for the Powelshell details: Test2Output.txt
First, make sure you do mvn clean install
just to make sure the building target dir is empty.
[main] ERROR com.github.sparqlanything.model.BaseFacadeXGraphBuilder - org.apache.commons.io.IOExceptionList: 1 exceptions: [java.io.IOException: Unable to delete file: C:\Users\Marco\GitProjects\sparql.anything\sparql-anything-csv\target\test-classes\tmp\9938521203035839544\Data-0001]
I don't understand this line ... can you please try by changing line 169 as follows:
169 File tmp = new File(getClass().getClassLoader().getResource(".").getPath(), "/tmp2/");
basically, change the name of the folder from tmp
to tmp2
It's difficult as I don't have a windows 10 myself and cannot reproduce...
Looking at the code, I am not quite sure what it is supposed to happen after this error anyway as the code proceeds gracefully:
https://github.com/SPARQL-Anything/sparql.anything/blob/ba17609cb4a00838bce074a013e348f2d8ff8b25/sparql-anything-model/src/main/java/com/github/sparqlanything/model/BaseFacadeXGraphBuilder.java#L60-L80
@justin2004 what's your opinion on this one?
I have made the suggested change to CSVTriplifierTest.java and ran mvn clean install.
Exactly the same error message resulted.
Interesting. Let me get a Windows 10 VM running and I'll see if I can reproduce it.
We are looking towards a release v0.8.0 -- maybe we should move this one to the next milestone v0.9.0?
let me see if i can reproduce this tomorrow. if i can't then we can move it to the next milestone.
I suspect that this problem may be resolved after #298 #299 and #300
@MarcoR1791 can you please try again with the latest version of branch v0.8-DEV
-- the problems may have disappeared after the recent changes (or it would be useful to check if we get new/different problems).
Hi Enrico,
I'm afraid the problem persists. I've just obtained the following:
Tests in error: testWithOnDiskGraph1(com.github.sparqlanything.csv.CSVTriplifierTest): 1 exceptions: [java.io.IOException: Unable to delete file: C:\Users\Marco\GitProjects\sparql.anything\sparql-anything-csv\target\test-classes\testOndiskGraph1\Data-0001] testWithOnDiskGraph2(com.github.sparqlanything.csv.CSVTriplifierTest): 1 exceptions: [java.io.IOException: Unable to delete file: C:\Users\Marco\GitProjects\sparql.anything\sparql-anything-csv\target\test-classes\testWithOnDiskGraph2\Data-0001]
Let me see if I can reproduce the errors. I'm installing Windows 10 on a Virtual Machine.
It seems that the test fails because it raises an exceptions when it tries to delete the temporary folder for the TDB (which, for an unknown reason, results in-use here ). We can change deleteDirectory(tmp) with deleteQuitely(tmp) so as to avoid exceptions to be raised and use an OS independent temporary directory for the TDB (see #296) (so the folder will be removed sooner or later).
With be26802 the tests don't fail anymore on my Win10 VM, so I think we can close the issue and proceed with the release #306. Please @MarcoR1791 let us know if you still experience the problem.
Hi @luigi-asprino, @enridaga
I've run the 'mvn clean install' and the csv tests pass. There is however a new failure at the markdown triplifier test:
Results :
Failed tests: testFencedCodeBlock(com.github.sparqlanything.markdown.MARKDOWNTriplifierTest) testYamlFrontMatter(com.github.sparqlanything.markdown.MARKDOWNTriplifierTest) testIndentedCodeBlock(com.github.sparqlanything.markdown.MARKDOWNTriplifierTest)
Would you guys like me to open a new issue?
Yes, please. Could you please also report the message error?
@MarcoR1791, please have a look at #366. I think the problem has been solved with that issue.
Hi @luigi-asprino.
Just cloned a fresh copy of the software and tried to install it. The markdown issue has been fixed but there is a new one when testing archive:
Results :
Failed tests: testMatches(com.github.sparqlanything.zip.test.FolderTriplifierTest): expected:<[, test.txt, test.csv, test.xml]> but was:<[]>
Stack trace:
Running com.github.sparqlanything.zip.test.FolderTriplifierTest false [ a http://sparql.xyz/facade-x/ns/root ] . Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 3.407 sec <<< FAILURE! testMatches(com.github.sparqlanything.zip.test.FolderTriplifierTest) Time elapsed: 0.219 sec <<< FAILURE! java.lang.AssertionError: expected:<[, test.txt, test.csv, test.xml]> but was:<[]> at org.junit.Assert.fail(Assert.java:89) at org.junit.Assert.failNotEquals(Assert.java:835) at org.junit.Assert.assertEquals(Assert.java:120) at org.junit.Assert.assertEquals(Assert.java:146) at com.github.sparqlanything.zip.test.FolderTriplifierTest.testMatches(FolderTriplifierTest.java:121) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) at java.base/java.lang.reflect.Method.invoke(Method.java:577) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63) at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329) at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.ParentRunner.run(ParentRunner.java:413) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) at java.base/java.lang.reflect.Method.invoke(Method.java:577) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
This is strange because the test passes on my VM.
What's the status of this one? If Luigi can't reproduce, @MarcoR1791, WDYT?
There is a problem with local paths used in tests with ondisk option (e.g. IssuesTest.test295 IssuesTest.test280_2). The test first instantiates a file with the path of the TDB, then, passes the absolute path of the file as an option. In doing that the path separator becomes a backslash since it is the standard in Windows. However, the backslash is interpreted as an escape character and breaks the path.
f45decc fixes the problem with paths. However, it seems that there is still a problem with the test for the issue #295. The test raises an exception when it tries to delete the folder containing the TDB of a previous slice. For a strange reason, this happens only on Windows.
I reported on Jena repository the problem with deleting the TDB2. Apart from that which causes the test #295 to fail, the Maven build on Windows goes smoothly.
Unfortunately, it falls into a known JVM problem with Windows. Once the file is mapped, it can be deleted only once the JVM terminates. However, we can clear the TDB instead of deleting its folder. This behaviour is implemented in 41a1b24.
Finally, the Maven build seems to work on Windows 10.
I think this can be closed now.