You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/06/03 17:07:59 UTC

[jira] [Commented] (TINKERPOP-1317) IoGraphTest throws error: URI is not hierarchical

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

ASF GitHub Bot commented on TINKERPOP-1317:
-------------------------------------------

GitHub user pluradj opened a pull request:

    https://github.com/apache/incubator-tinkerpop/pull/328

    use graph class as root class to find temporary directory

    https://issues.apache.org/jira/browse/TINKERPOP-1317

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/pluradj/incubator-tinkerpop TINKERPOP-1317

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-tinkerpop/pull/328.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #328
    
----
commit 4b9bb87cd80bf6658e40090dd2cdb7b7b8f97122
Author: Jason Plurad <pl...@us.ibm.com>
Date:   2016-06-03T17:03:19Z

    use graph class as root class to find temporary directory

----


> IoGraphTest throws error: URI is not hierarchical
> -------------------------------------------------
>
>                 Key: TINKERPOP-1317
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1317
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: test-suite
>    Affects Versions: 3.2.0-incubating, 3.1.2-incubating
>            Reporter: Jason Plurad
>            Assignee: Jason Plurad
>            Priority: Minor
>
> Via https://groups.google.com/d/msg/gremlin-users/aap3pxZtGyU/t-eOC6ZyAAAJ
> These methods will fail for graph providers that are trying to implement the test suite:
> * {{IoGraphTest.shouldReadWriteModernToFileWithHelpers()}}
> * {{IoGraphTest.shouldReadWriteClassicToFileWithHelpers()}}
> Example stack trace:
> {noformat}
> shouldReadWriteModernToFileWithHelpers[gryo](org.apache.tinkerpop.gremlin.structure.io.IoGraphTest)  Time elapsed: 0.004 sec  <<< ERROR!
> java.lang.RuntimeException: Unable to computePath for class org.apache.tinkerpop.gremlin.structure.io.IoGraphTest
> 	at org.apache.tinkerpop.gremlin.TestHelper.computePath(TestHelper.java:117)
> 	at org.apache.tinkerpop.gremlin.TestHelper.getRootOfBuildDirectory(TestHelper.java:105)
> 	at org.apache.tinkerpop.gremlin.TestHelper.makeTestDataPath(TestHelper.java:70)
> 	at org.apache.tinkerpop.gremlin.TestHelper.generateTempFile(TestHelper.java:127)
> 	at org.apache.tinkerpop.gremlin.structure.io.IoGraphTest.shouldReadWriteModernToFileWithHelpers(IoGraphTest.java:164)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:497)
> 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> 	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> 	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.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
> 	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
> 	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
> 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> 	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> 	at org.junit.runners.Suite.runChild(Suite.java:128)
> 	at org.junit.runners.Suite.runChild(Suite.java:27)
> 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> 	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> 	at org.junit.runners.Suite.runChild(Suite.java:128)
> 	at org.apache.tinkerpop.gremlin.AbstractGremlinSuite.runChild(AbstractGremlinSuite.java:212)
> 	at org.apache.tinkerpop.gremlin.AbstractGremlinSuite.runChild(AbstractGremlinSuite.java:50)
> 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> 	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> 	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:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:497)
> 	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)
> Caused by: java.lang.IllegalArgumentException: URI is not hierarchical
> 	at java.io.File.<init>(File.java:418)
> 	at org.apache.tinkerpop.gremlin.TestHelper.computePath(TestHelper.java:115)
> 	... 54 more
> {noformat}
> The problem is that the code is attempting to create a temp file underneath the {{gremlin-test.jar}} file located in the local {{$HOME/.m2/repository/}} directory.
> One workaround is to use a {{build.dir}} property, and this is documented in the source code, see [this|https://github.com/apache/incubator-tinkerpop/blob/3.2.0-incubating/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/TestHelper.java#L99-L103] and [that|https://github.com/apache/incubator-tinkerpop/blob/3.2.0-incubating/pom.xml#L1007].
> The fix I'm proposing is to use the graph implementation class instead of the test class as the root of the build directory. Since the tests are typically run with the graph implementation, it will find the class under the {{target}} directory. Graph providers wouldn't have to do any additional Maven tricks to consume {{gremlin-test}}, and the existing workaround will continue to work.
> I'll submit a patch for this and also update the docs to make the workaround more visible.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)