You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by Stephen Mallette <sp...@gmail.com> on 2015/06/12 20:22:26 UTC
IoTest Structuring
I've been thinking about serialization in the last day or so and realized
that the IoTest was growing a bit out of control (lots of cut/paste, one
big fat class of tests to scroll through thousands of lines long, etc.). I
spent a little bit of time today restructuring that into some smaller tests
classes that were parameterized so that it would be easy to add new tests
in the future for all of the IO implementations at once.
I've tested the changes against three different graph implementations and
they all seem to pass. Note that I didn't really change any of the
semantics of the test themselves - just moved things around (but sometimes
moving things about can cause problems too). If your Graph implementation
has any OptOut annotations around IoTest (i think elastic-gremlin does) you
will want to double check your naming there given the move.
Stephen
Re: IoTest Structuring
Posted by Stephen Mallette <sp...@gmail.com>.
Please see the last few paragraphs of this section of the docs for proper
use of the "specific" parameter:
http://tinkerpop.incubator.apache.org/docs/3.0.0-SNAPSHOT/#validating-with-gremlin-test
You can also see example usage in Titan:
https://github.com/thinkaurelius/titan/blob/ff693ab0b7d8c1c20e3b4bdb0c9de547f7504abd/titan-core/src/main/java/com/thinkaurelius/titan/core/TitanGraph.java#L26-L45
On Sat, Jul 4, 2015 at 7:02 AM, Ran Magen <rm...@gmail.com> wrote:
> Hey Stephen,
> It seems I can't {{OptOut}} of dynamic tests. I tried a few variations, but
> either they still run the test, or throw some kind of exception:
> @Graph.OptOut(test =
> "org.apache.tinkerpop.gremlin.structure.io.IoGraphTest", method =
> "shouldReadWriteClassic", reason = "foo")
> @Graph.OptOut(test =
> "org.apache.tinkerpop.gremlin.structure.io.IoGraphTest", method =
> "shouldReadWriteClassic", specific="shouldReadWriteClassic", reason =
> "foo")
> @Graph.OptOut(test =
> "org.apache.tinkerpop.gremlin.structure.io.IoGraphTest", method = "*",
> specific="shouldReadWriteClassic", reason = "foo")
> @Graph.OptOut(test =
> "org.apache.tinkerpop.gremlin.structure.io.IoGraphTest", method = "*",
> reason
> = "foo")
> *None of the above work.
>
>
> On Sun, 14 Jun 2015 at 12:55 Ran Magen <rm...@gmail.com> wrote:
>
> > I'll take care of it, thanks for the heads up
> > On יום ו׳, 12 ביוני 2015 at 21:22 Stephen Mallette <spmallette@gmail.com
> >
> > wrote:
> >
> >> I've been thinking about serialization in the last day or so and
> realized
> >> that the IoTest was growing a bit out of control (lots of cut/paste, one
> >> big fat class of tests to scroll through thousands of lines long, etc.).
> >> I
> >> spent a little bit of time today restructuring that into some smaller
> >> tests
> >> classes that were parameterized so that it would be easy to add new
> tests
> >> in the future for all of the IO implementations at once.
> >>
> >> I've tested the changes against three different graph implementations
> and
> >> they all seem to pass. Note that I didn't really change any of the
> >> semantics of the test themselves - just moved things around (but
> sometimes
> >> moving things about can cause problems too). If your Graph
> implementation
> >> has any OptOut annotations around IoTest (i think elastic-gremlin does)
> >> you
> >> will want to double check your naming there given the move.
> >>
> >> Stephen
> >>
> >
>
Re: IoTest Structuring
Posted by Ran Magen <rm...@gmail.com>.
Hey Stephen,
It seems I can't {{OptOut}} of dynamic tests. I tried a few variations, but
either they still run the test, or throw some kind of exception:
@Graph.OptOut(test =
"org.apache.tinkerpop.gremlin.structure.io.IoGraphTest", method =
"shouldReadWriteClassic", reason = "foo")
@Graph.OptOut(test =
"org.apache.tinkerpop.gremlin.structure.io.IoGraphTest", method =
"shouldReadWriteClassic", specific="shouldReadWriteClassic", reason = "foo")
@Graph.OptOut(test =
"org.apache.tinkerpop.gremlin.structure.io.IoGraphTest", method = "*",
specific="shouldReadWriteClassic", reason = "foo")
@Graph.OptOut(test =
"org.apache.tinkerpop.gremlin.structure.io.IoGraphTest", method = "*", reason
= "foo")
*None of the above work.
On Sun, 14 Jun 2015 at 12:55 Ran Magen <rm...@gmail.com> wrote:
> I'll take care of it, thanks for the heads up
> On יום ו׳, 12 ביוני 2015 at 21:22 Stephen Mallette <sp...@gmail.com>
> wrote:
>
>> I've been thinking about serialization in the last day or so and realized
>> that the IoTest was growing a bit out of control (lots of cut/paste, one
>> big fat class of tests to scroll through thousands of lines long, etc.).
>> I
>> spent a little bit of time today restructuring that into some smaller
>> tests
>> classes that were parameterized so that it would be easy to add new tests
>> in the future for all of the IO implementations at once.
>>
>> I've tested the changes against three different graph implementations and
>> they all seem to pass. Note that I didn't really change any of the
>> semantics of the test themselves - just moved things around (but sometimes
>> moving things about can cause problems too). If your Graph implementation
>> has any OptOut annotations around IoTest (i think elastic-gremlin does)
>> you
>> will want to double check your naming there given the move.
>>
>> Stephen
>>
>
Re: IoTest Structuring
Posted by Ran Magen <rm...@gmail.com>.
I'll take care of it, thanks for the heads up
On יום ו׳, 12 ביוני 2015 at 21:22 Stephen Mallette <sp...@gmail.com>
wrote:
> I've been thinking about serialization in the last day or so and realized
> that the IoTest was growing a bit out of control (lots of cut/paste, one
> big fat class of tests to scroll through thousands of lines long, etc.). I
> spent a little bit of time today restructuring that into some smaller tests
> classes that were parameterized so that it would be easy to add new tests
> in the future for all of the IO implementations at once.
>
> I've tested the changes against three different graph implementations and
> they all seem to pass. Note that I didn't really change any of the
> semantics of the test themselves - just moved things around (but sometimes
> moving things about can cause problems too). If your Graph implementation
> has any OptOut annotations around IoTest (i think elastic-gremlin does) you
> will want to double check your naming there given the move.
>
> Stephen
>