Wow just reading over my email again helped me figure this one out.
Although the messages sent are the same, there's a distinct difference
between the two tests.

The gremlin-driver test creates two clients that I'm guessing connect to
gremlin-server via different sockets.
The gremlin-php test sends both sessionless and in session messages on the
same socket (same client). If I create two different clients the tests
pass.

Is this something I can test with gremlin-driver? I'll go through the api
to see if I can build a failing test.

I don't know if this was by design but it's a bit of an issue as we usually
only create one client per thread and then mix sessionless and in-session
requests with a single client. (The single client design is more or less
standard in PHP).

Anyways if it's by design and there's a good reason I guess I could modify
the driver to abstract multi client handling for both cases.

On Thu, Oct 22, 2015 at 11:37 AM, Dylan Millikin <[email protected]>
wrote:

> Hey guys,
>
> I've written the following test that passes:
>
> https://github.com/PommeVerte/incubator-tinkerpop/blob/transaction-test/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java#L591-L615
>
> Unfortunately the exact same test from my gremlin-php driver fails. The
> second isOpen() test returns true.
>
> The gremlin-php messages sent are the following :
>
>
> application/json{"requestId":"77a459e3-32d9-4640-89cb-c2e28c67caf5","processor":"session","op":"eval","args":{"gremlin":"graphT.tx().open()","session":"6e1c97b3-3f69-4b08-aa7c-c137a47cf04b"}}
>
>
> application/json{"requestId":"576aec62-442a-4a21-bcac-cbac36a388e9","processor":"session","op":"eval","args":{"gremlin":"t.addV(\"name\",\"stephen\").next()","session":"6e1c97b3-3f69-4b08-aa7c-c137a47cf04b"}}
>
>
> application/json{"requestId":"e1dfae26-f115-43c3-9b44-cf2879375037","processor":"session","op":"eval","args":{"gremlin":"graphT.tx().commit()","session":"6e1c97b3-3f69-4b08-aa7c-c137a47cf04b"}}
>
>
> application/json{"requestId":"359e2f72-f6fd-4a91-a0bd-0dd8002465fb","processor":"session","op":"eval","args":{"gremlin":"graphT.tx().isOpen()","session":"6e1c97b3-3f69-4b08-aa7c-c137a47cf04b"}}
> ----RETURNS FALSE----
>
>
> application/json{"requestId":"bf1a7d47-5819-4171-87a0-3be5adfe70e7","processor":"","op":"eval","args":{"gremlin":"graphT.traversal().V()"}}
>
>
> application/json{"requestId":"53f53620-4337-4ccf-8a85-6ab25d0f78e3","processor":"session","op":"eval","args":{"gremlin":"graphT.tx().isOpen()","session":"6e1c97b3-3f69-4b08-aa7c-c137a47cf04b"}}
> ----RETURNS TRUE----
>
> And as far as I can tell these are the same as the ones sent from
> gremlin-driver test but the results differ. The only thing that changes
> might be the serializer which should have no effect?
>
> If anyone has any idea as to where there could be an issue, feel free to
> shout out with ideas (as vague as they may be) I'm investigating this one
> in the dark so I'd be more that grateful for a little help focussing my
> search.
>
> PS: results are the same with the ThreadLocal transaction consumers patch.
> Although this shouldn't have an effect anyways I thought I would point it
> out.
>
> Cheers,
> Dylan.
>

Reply via email to