You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Martin Häusler (JIRA)" <ji...@apache.org> on 2015/12/18 13:24:46 UTC

[jira] [Comment Edited] (TINKERPOP-1052) @Graph.OptOut causes Exception during Suite setup

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

Martin Häusler edited comment on TINKERPOP-1052 at 12/18/15 12:24 PM:
----------------------------------------------------------------------

Hi Stephen, thanks for the response - it's good to see that there's somebody on the "other side of the API" who takes care of the test suite.

If I replace the {{"\*"}} in the annotation with a concrete method name, e.g.  {{"shouldReadWriteModernToFileWithHelpers"}}, then the test suite runs, but the specified test method is *executed* as it would normally - in other words, the {{@Graph.OptOut(...)}} annotation is ignored alltogether. Maybe this is somehow related to the fact that the {{IoGraphTest}} is parameterized? 

The {{@Graph.OptOut}} works fine for me for regular test classes, e.g. {{DetachedVertexTest}}, but only if I specify a concrete test method. Specifying {{"\*"}} always crashes the test suite generation, with the same stack trace as posted in the original ticket description.


was (Author: martin_haeusler):
Hi Stephen, thanks for the response - it's good to see that there's somebody on the "other side of the API" who takes care of the test suite.

If I replace the {{"\*"}} in the annotation with a concrete method name, e.g.  {{"shouldReadWriteModernToFileWithHelpers"}}, then the test suite runs, but the specified test method is *executed* as it would normally - in other words, the {{@Graph.OptOut(...)}} annotation is ignored alltogether. Maybe this is somehow related to the fact that the {{IoGraphTest}} is parameterized? 

The {{@Graph.OptOut}} works fine for me for regular test classes, e.g. {{DetachedVertexTest}}, but only if I specify a concrete test method. Specifying {{"\*"}} always crashes the test suite generation.

> @Graph.OptOut causes Exception during Suite setup
> -------------------------------------------------
>
>                 Key: TINKERPOP-1052
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1052
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: test-suite
>    Affects Versions: 3.0.2-incubating
>         Environment: Java 8, Windows 10 x64, Gradle (Dependencies)
>            Reporter: Martin Häusler
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> According to the documentation, adding the following annotation to my graph class should allow me to opt-out from I/O-Tests, right?
> {code}
> @Graph.OptOut(test = "org.apache.tinkerpop.gremlin.structure.io.IoGraphTest", method = "*", reason = "IO Isuses on windows")
> {code}
> ... well, unfortunately starting the test suite with this annotation creates the following exception (cancelling the execution of the suite as a whole):
> {code}
> java.lang.NullPointerException
> 	at java.lang.Class.isAssignableFrom(Native Method)
> 	at org.apache.tinkerpop.gremlin.AbstractGremlinSuite$OptOutTestFilter.lambda$shouldRun$15(AbstractGremlinSuite.java:289)
> 	at java.util.stream.MatchOps$1MatchSink.accept(Unknown Source)
> 	at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
> 	at java.util.ArrayList$ArrayListSpliterator.tryAdvance(Unknown Source)
> 	at java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
> 	at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source)
> 	at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
> 	at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
> 	at java.util.stream.MatchOps$MatchOp.evaluateSequential(Unknown Source)
> 	at java.util.stream.MatchOps$MatchOp.evaluateSequential(Unknown Source)
> 	at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
> 	at java.util.stream.ReferencePipeline.anyMatch(Unknown Source)
> 	at org.apache.tinkerpop.gremlin.AbstractGremlinSuite$OptOutTestFilter.shouldRun(AbstractGremlinSuite.java:289)
> 	at org.apache.tinkerpop.gremlin.AbstractGremlinSuite$OptOutTestFilter.shouldRun(AbstractGremlinSuite.java:301)
> 	at org.junit.runners.ParentRunner.shouldRun(ParentRunner.java:434)
> 	at org.junit.runners.ParentRunner.filter(ParentRunner.java:382)
> 	at org.junit.runner.manipulation.Filter.apply(Filter.java:97)
> 	at org.junit.runners.ParentRunner.filter(ParentRunner.java:384)
> 	at org.apache.tinkerpop.gremlin.AbstractGremlinSuite.registerOptOuts(AbstractGremlinSuite.java:136)
> 	at org.apache.tinkerpop.gremlin.AbstractGremlinSuite.<init>(AbstractGremlinSuite.java:93)
> 	at org.apache.tinkerpop.gremlin.structure.StructureStandardSuite.<init>(StructureStandardSuite.java:111)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
> 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
> 	at java.lang.reflect.Constructor.newInstance(Unknown Source)
> 	at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:107)
> 	at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
> 	at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
> 	at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
> 	at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
> 	at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)
> 	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createUnfilteredTest(JUnit4TestLoader.java:84)
> 	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:70)
> 	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:43)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:444)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
> {code}
> Here's my full graph interface declaration, for reference:
> {code}
> @Graph.OptIn(Graph.OptIn.SUITE_STRUCTURE_STANDARD)
> @Graph.OptOut(test = "org.apache.tinkerpop.gremlin.structure.io.IoGraphTest", method = "*", reason = "IO Isuses on windows")
> @GraphFactoryClass(MyGraphFactoryImpl.class)
> public interface MyGraph extends Graph {
>  // ...
> }
> {code}
> ... and my test suite declaration:
> {code}
> @RunWith(StructureStandardSuite.class)
> @GraphProviderClass(provider = MyGraphProvider.class, graph = MyGraph.class)
> public class MyGraphStructureStandardTestSuite {
> }
> {code}



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