Closed fitzoh closed 9 years ago
It's ugly, but there's now a single test running off clojure code
interesting. you definitely got past the point where i felt blocked - so that's good. what would you say is the next step?
I'm not entirely sure. the most obvious route seems to be applying the same pattern to fill out the rest of the test suite, create a java class mirroring each test, and usee that to get the closure version of the traversal.
It would be nice if there were an easy way to accomplish that with a little less ceremony.
I agree that if there was a nicer way to do this, it would be good to find it. it would stink to spend time implementing that pattern against the full gremlin test suite (which is a lot) only to have to change it all again later if that nicer way became apparent. at least you have a method for doing it - that was a really big step - thanks for that.
So I was playing with this a little bit more.
I figured out how to create a clojure class which extends a java test case, and I can execute the test, but annotations aren't working, which means the test graphs aren't being loaded.
Empty graphs are from extending DedupTest in Clojure, populated graphs are from extending DedupTest in Java.
------------- Standard Output ---------------
#<TinkerGraph tinkergraph[vertices:0 edges:0]>
Testing: [GraphStep(vertex), VertexStep(BOTH,vertex), DedupStep, PropertiesStep([name],value)]
[TinkerGraphStep(vertex), VertexStep(BOTH,vertex), DedupStep, PropertiesStep([name],value)]
#<TinkerGraph tinkergraph[vertices:0 edges:0]>
Testing: [GraphStep(vertex), VertexStep(BOTH,vertex), DedupStep, PropertiesStep([name],value)]
[TinkerGraphStep(vertex), VertexStep(BOTH,vertex), DedupStep, PropertiesStep([name],value)]
#<TinkerGraph tinkergraph[vertices:0 edges:0]>
Testing: [GraphStep(vertex), VertexStep(BOTH,vertex), DedupStep, PropertiesStep([name],value)]
[TinkerGraphStep(vertex), VertexStep(BOTH,vertex), DedupStep, PropertiesStep([name],value)]
g = tinkergraph[vertices:6 edges:6]
Testing: [GraphStep(vertex), VertexStep(BOTH,vertex), HasStep([~label,eq,software]), DedupStep(value(lang)), PropertiesStep([name],value)]
[TinkerGraphStep(vertex), VertexStep(BOTH,vertex), HasStep([~label,eq,software]), DedupStep(value(lang)), PropertiesStep([name],value)]
g = tinkergraph[vertices:6 edges:6]
Testing: [GraphStep(vertex), VertexStep(BOTH,vertex), DedupStep, PropertiesStep([name],value)]
[TinkerGraphStep(vertex), VertexStep(BOTH,vertex), DedupStep, PropertiesStep([name],value)]
g = tinkergraph[vertices:6 edges:6]
Testing: [GraphStep(vertex), VertexStep(BOTH,vertex), PropertiesStep([name],property), OrderStep(lambda), DedupStep, PropertyValueStep]
[TinkerGraphStep(vertex), VertexStep(BOTH,vertex), PropertiesStep([name],property), OrderStep(lambda), DedupStep, PropertyValueStep]
hmmm - good try. thanks for sticking with this. figuring out a nice way to get this working will be important for ensuring ogre has solid integration over tinkerpop. even a sub-optimal solution beats re-implementing the hundreds of tests that the test-suite has.
working towards getting tinkerpop test suite working #27