You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Jason Plurad (JIRA)" <ji...@apache.org> on 2016/06/01 18:11:59 UTC
[jira] [Created] (TINKERPOP-1317) IoGraphTest throws error: URI is
not hierarchical
Jason Plurad created TINKERPOP-1317:
---------------------------------------
Summary: 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.1.2-incubating, 3.2.0-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)