[ 
https://issues.apache.org/jira/browse/JENA-418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13611664#comment-13611664
 ] 

Brian McBride commented on JENA-418:
------------------------------------

[[
Could you please give details of the fm_open_10() test failure? Stacktrace, 
line numbers?
]]

[[
fm_open_10(org.apache.jena.riot.stream.TestStreamManager)  Time elapsed: 0 sec  
<<< ERROR!
org.apache.jena.riot.RiotNotFoundException: Not found: 
C:\Users\bwm\eclipse\juno\jena\jena\jena-arq\testing\RIOT\StreamManager/D.ttl
        at org.apache.jena.riot.RDFDataMgr.open(RDFDataMgr.java:732)
        at org.apache.jena.riot.RDFDataMgr.open(RDFDataMgr.java:714)
        at org.apache.jena.riot.RDFDataMgr.open(RDFDataMgr.java:696)
        at 
org.apache.jena.riot.stream.TestStreamManager.open(TestStreamManager.java:115)
        at 
org.apache.jena.riot.stream.TestStreamManager.fm_open_10(TestStreamManager.java:89)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
        at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
        at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at org.junit.runners.Suite.runChild(Suite.java:127)
        at org.junit.runners.Suite.runChild(Suite.java:26)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        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)

Running org.apache.jena.riot.web.TS_RiotWeb
Tests run: 19, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec
Running org.apache.jena.riot.writer.TS_RiotWriter
Tests run: 350, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.563 sec

Results :

Tests in error: 
  fm_open_10(org.apache.jena.riot.stream.TestStreamManager): Not found: 
C:\Users\bwm\eclipse\juno\jena\jena\jena-arq\testing\RIOT\StreamManager/D.ttl
  fm_open_10(org.apache.jena.riot.stream.TestStreamManager): Not found: 
C:\Users\bwm\eclipse\juno\jena\jena\jena-arq\testing\RIOT\StreamManager/D.ttl
]]

Examining with the debugger, the file it is actually trying to open is:

[[
testing/RIOT/StreamManager\C:\Users\bwm\eclipse\juno\jena\jena\jena-arq\testing\RIOT\StreamManager/D.ttl
]]

The failures occur both when pulled from GIT and from svn trunk.

[[
Just returning the fn when scheme length is 1 (windows) ignores the directory 
setting of the LocatorFile.

        LocatorFile x = new LocatorFile("C:/DIR") ;
        System.out.println(x.toFileName("C:foo")) ;
]]

Yes. That was my intent, as noted in the comment.

[[
should be C:/DIR/foo

Currently it's C:/DIR/C:foo and with the patch: C:foo.
]]

Ok.  

I'm not clear what the contract for this method is.  Is this method required to 
return an absolute filename? What should the following return
  
new LocatorFile("C:/DIR") .toFileName("D:foo")  == new 
File("D:foo").getAbsolutePath() ?
new LocatorFile("C:/DIR").toFileName("C:foo")  == "C:/DIR/foo"

Note that the behaviour there is different depending on whether the relative 
path is on the same drive as the base path.

An alternative would be to define the contract such that if you want a path 
relative to the locator base, don't put a drive letter on it.  If you do put a 
drive letter on it - then it will be interpretted as absolute or drive relative 
which is the approach taken in the patch.

I would be happy to amend the patch to fit the contract if that would be 
helpful, or leave it to others.


                
> Test riot.stream.TestStreamManager.fm_open_10() fails on windows 8
> ------------------------------------------------------------------
>
>                 Key: JENA-418
>                 URL: https://issues.apache.org/jira/browse/JENA-418
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: ARQ
>         Environment: Windows 8
>            Reporter: Brian McBride
>            Priority: Minor
>         Attachments: org.apache.jena.riot.stream.LocatorFile-2.patch, 
> org.apache.jena.riot.stream.LocatorFile.patch
>
>
> riot.stream.LocatorFile does not recognize a windows absolute pathname (e.g. 
> C:\foobar) as an absolute path.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to